Conversation
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to enforce a standardized pull request title format ([AURON #<issue>] <description>) for PRs.
Changes:
- Introduces a new workflow that runs on PR open/sync/reopen/edit events.
- Validates PR titles against a regex pattern and fails the check if invalid.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,34 @@ | |||
| name: Pull Request Title Check | |||
There was a problem hiding this comment.
This workflow is missing the standard ASF Apache 2.0 license header comment block that appears at the top of other files under .github/workflows. Please add the header to keep licensing consistent across workflow files.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/pr-title-check.yml
Outdated
| branches: | ||
| - '**' |
There was a problem hiding this comment.
branches: ['**'] under pull_request is redundant (the default is to run for PRs targeting any branch). Removing the branches filter would simplify the workflow; alternatively, if you intended to follow the repo’s usual CI scoping, restrict it to master/branch-* like other workflows.
| branches: | |
| - '**' |
| types: [opened, synchronize, reopened, edited] | ||
|
|
||
| jobs: | ||
| pr-title-check: |
There was a problem hiding this comment.
Consider adding an explicit permissions: block (e.g., no permissions or read-only) since this workflow only reads github.event.pull_request.title and doesn’t need repo write access. This follows least-privilege and helps avoid surprises if org/repo defaults change.
| pr-title-check: | |
| pr-title-check: | |
| permissions: {} |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| PATTERN='^\[AURON #[0-9]+\] .{3,}$' | ||
|
|
||
| if ! printf '%s\n' "$PR_TITLE" | grep -qE "$PATTERN"; then |
There was a problem hiding this comment.
There’s trailing whitespace after then on this line, which can cause noisy diffs and may fail whitespace-sensitive linters. Please remove the extra space.
| if ! printf '%s\n' "$PR_TITLE" | grep -qE "$PATTERN"; then | |
| if ! printf '%s\n' "$PR_TITLE" | grep -qE "$PATTERN"; then |
Which issue does this PR close?
Closes #2064
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?
How was this patch tested?