Skip to content

[CALCITE-7872] Validate pull request titles and require a single matching commit - #5347

Draft
xiedeyantu wants to merge 2 commits into
apache:mainfrom
xiedeyantu:CALCITE-7871
Draft

xiedeyantu wants to merge 2 commits into
apache:mainfrom
xiedeyantu:CALCITE-7871

Conversation

@xiedeyantu

@xiedeyantu xiedeyantu commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Jira Link

CALCITE-7871

Changes Proposed

See CALCITE-7871

@xiedeyantu
xiedeyantu marked this pull request as draft October 20, 2026 02:04
@mihaibudiu

Copy link
Copy Markdown
Contributor

I think you should allow multiple commits, but require 1 to fit exactly

@xiedeyantu

Copy link
Copy Markdown
Member Author

I think you should allow multiple commits, but require 1 to fit exactly

My initial idea was to spare those with write access from having to spend extra time verifying these details—essentially allowing this CI check to fail during the PR review process, provided that its final status is "passed". I am currently still exploring ways to better verify that the logic aligns with expectations.

@xiedeyantu xiedeyantu changed the title Validate pull request titles and require a single matching commit [CALCITE-12345] Validate pull request titles and require a single matching commit Oct 20, 2026
@xiedeyantu xiedeyantu changed the title [CALCITE-12345] Validate pull request titles and require a single matching commit [CALCITE-7871] Validate pull request titles and require a single matching commits Oct 20, 2026
@xiedeyantu xiedeyantu changed the title [CALCITE-7871] Validate pull request titles and require a single matching commits [CALCITE-7871] Validate pull request titles and require a single matching commit Oct 20, 2026
Comment thread .github/pull_request_template.md Outdated
https://issues.apache.org/jira/projects/CALCITE/issues
*Check existing issues first to avoid duplicates.*
*Note: A Jira is NOT required for typos and cosmetic changes (i.e., changes that are neither bugs nor features).*
*Exceptions: Use `[TEST]` for test additions or `[MINOR]` for other minor changes, such as typos and cosmetic changes. These prefixes do not require a Jira issue.*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we covering all cases here? What about Site: ... PRs? Or Bump... PRs from dependabot?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You’re right—the current "allowlist" is too restrictive. Looking at the local commit history, I see that it includes not only updates from Site: and Dependabot, but also reverts and descriptive titles used for tests or minor changes.
Furthermore, the existing LintTest rejects prefixes that don’t follow the Jira format (such as [MINOR]), which means the [TEST] / [MINOR] convention I introduced conflicts with the current validation rules.
I suggest the following: if a title contains a Jira prefix, we validate the corresponding Jira reference; otherwise, we allow descriptive titles without a Jira prefix—bypassing validation for these cases to provide more flexibility. This would eliminate the need to maintain an ever-growing list of "special prefixes." What do you think?

@zabetak zabetak added the discussion-in-jira There's open discussion in JIRA to be resolved before proceeding with the PR label Oct 20, 2026
Comment thread .github/workflows/pr-ci.yml Fixed
Comment thread .github/workflows/pr-ci.yml Fixed
Comment thread .github/workflows/pr-ci.yml Fixed
Comment thread .github/workflows/pr-ci.yml Fixed
Comment thread .github/workflows/pr-ci.yml Fixed
Comment thread .github/workflows/pr-ci.yml Fixed
@sonarqubecloud

Copy link
Copy Markdown

@xiedeyantu xiedeyantu closed this Oct 21, 2026
@xiedeyantu xiedeyantu reopened this Oct 21, 2026
@xiedeyantu xiedeyantu changed the title [CALCITE-7871] Validate pull request titles and require a single matching commit [CALCITE-7872] Validate pull request titles and require a single matching commit Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approve discussion-in-jira There's open discussion in JIRA to be resolved before proceeding with the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants