Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- markdownlint-disable MD012 -->

Comment on lines +1 to +2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Disable MD041 for markdownlint
Since the file begins with an HTML comment before the H1 heading, you may want to disable MD041 (first-line-heading) to prevent lint errors.

🤖 Prompt for AI Agents
In .github/PULL_REQUEST_TEMPLATE.md at lines 1 to 2, add a markdownlint disable
directive for MD041 to prevent lint errors caused by the initial HTML comment
before the first heading. Insert a comment like <!-- markdownlint-disable MD041
--> at the top of the file to disable the first-line-heading rule.

<!--
Set the PR title to a meaningful commit message that:

* is in imperative form.
* follows the Conventional Commits specification (https://www.conventionalcommits.org).
* See https://github.com/commitizen/conventional-commit-types/blob/master/index.json for possible
types.

Example:

fix: Don't add implicit wildcards ('*') at the beginning and the end of a query (fixes #390).
-->

# Description

<!-- Describe what this request will change/fix and provide any details necessary for reviewers. -->



# Checklist

<!-- Ensure each item below is satisfied and indicate so by inserting an `x` within each `[ ]`. -->

* [ ] The PR satisfies the [contribution guidelines][yscope-contrib-guidelines].
* [ ] This is a breaking change and that has been indicated in the PR title, OR this isn't a
breaking change.
* [ ] Necessary docs have been updated, OR no docs need to be updated.

Comment on lines +22 to +30

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Enhance the checklist
Consider adding a bullet for “CI passes” or “Tests added” to ensure contributors validate functionality in addition to documentation.

🤖 Prompt for AI Agents
In .github/PULL_REQUEST_TEMPLATE.md around lines 22 to 30, the PR checklist
lacks an item to confirm that continuous integration (CI) checks pass or that
tests have been added. Add a new bullet point to the checklist for contributors
to mark that CI passes successfully or that relevant tests have been included,
ensuring validation of functionality alongside documentation updates.

# Validation performed

<!-- Describe what tests and validation you performed on the change. -->



[yscope-contrib-guidelines]: https://docs.yscope.com/dev-guide/contrib-guides-overview.html
30 changes: 30 additions & 0 deletions .github/workflows/pr-title-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "pr-title-checks"

on:
pull_request_target:
# NOTE: Workflows triggered by this event give the workflow access to secrets and grant the
# `GITHUB_TOKEN` read/write repository access by default. So we need to ensure:
# - This workflow doesn't inadvertently check out, build, or execute untrusted code from the
# pull request triggered by this event.
# - Each job has `permissions` set to only those necessary.
types: ["edited", "opened", "reopened"]
branches: ["presto-0.293-clp-connector"]

permissions: {}

concurrency:
group: "${{github.workflow}}-${{github.ref}}"

# Cancel in-progress jobs for efficiency
cancel-in-progress: true

Comment on lines +15 to +20

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Review concurrency grouping
Grouping by github.workflow and github.ref cancels outdated runs per branch. Consider scoping by PR number (github.event.pull_request.number) if you anticipate multiple workflows on the same branch.

🤖 Prompt for AI Agents
In .github/workflows/pr-title-checks.yaml around lines 15 to 20, the concurrency
group is currently set to use github.workflow and github.ref, which cancels
outdated runs per branch. To better scope concurrency when multiple workflows
run on the same branch, update the concurrency group to include
github.event.pull_request.number so that runs are grouped and canceled per PR
instead of per branch.

jobs:
conventional-commits:
permissions:
# For amannn/action-semantic-pull-request
pull-requests: "read"
runs-on: "ubuntu-latest"
steps:
- uses: "amannn/action-semantic-pull-request@v5"
env:
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
20 changes: 0 additions & 20 deletions .github/workflows/preliminary_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,3 @@ jobs:
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
exit 1
fi

title-check:
name: PR Title Format
runs-on: ubuntu-latest
steps:
- shell: python
env:
title: "${{ github.event.pull_request.title }}"
run: |
import re
import os
title = os.environ["title"]
title_re = r"^(feat|fix|build|test|docs|refactor|misc)(\(.+\))?!?: ([A-Z].+)[^.]$"
match = re.search(title_re, title)

if match is None:
print("::error::Please follow conventional commit guidelines in commit titles as described in CONTRIBUTING.md: https://github.com/facebookincubator/velox/blob/main/CONTRIBUTING.md#commit-messages")
exit(1)
else:
exit(0)