Skip to content

[AURON #2064] PR title check#2066

Open
XorSum wants to merge 11 commits intoapache:masterfrom
XorSum:pr-title-check
Open

[AURON #2064] PR title check#2066
XorSum wants to merge 11 commits intoapache:masterfrom
XorSum:pr-title-check

Conversation

@XorSum
Copy link
Contributor

@XorSum XorSum commented Mar 3, 2026

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?

@github-actions github-actions bot added the infra label Mar 3, 2026
@cxzl25 cxzl25 changed the title [AURON #2064] PR title check [auron #2064] PR title check Mar 3, 2026
@cxzl25 cxzl25 changed the title [auron #2064] PR title check [AURON#2064] PR title check Mar 3, 2026
@cxzl25 cxzl25 changed the title [AURON#2064] PR title check [AURON #2064]PR title check Mar 3, 2026
@cxzl25 cxzl25 changed the title [AURON #2064]PR title check [AURON #2064] PR title check Mar 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
XorSum and others added 5 commits March 3, 2026 20:10
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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +22 to +23
branches:
- '**'
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
branches:
- '**'

Copilot uses AI. Check for mistakes.
types: [opened, synchronize, reopened, edited]

jobs:
pr-title-check:
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
pr-title-check:
pr-title-check:
permissions: {}

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
if ! printf '%s\n' "$PR_TITLE" | grep -qE "$PATTERN"; then
if ! printf '%s\n' "$PR_TITLE" | grep -qE "$PATTERN"; then

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR title check

3 participants