[
https://issues.apache.org/jira/browse/CALCITE-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129881#comment-18129881
]
Julian Hyde commented on CALCITE-7871:
--------------------------------------
Thanks for raising this issue, [~jensen]. Automation that enforces norms is
welcome.
But, like [~zabetak], I would like to let people submit branches with
multiple-commits during the review process. (Those branches would get squashed
after approval.)
Does anyone know if there is a way to stage commits that are believed to be
ready to merge to main? The CI check on the subject line could apply to such
staged commits, and if all checks pass, the commit would be automatically
merged. The check on the subject line would not be applied to mere PRs.
> Validate pull request titles and require a single matching commit
> -----------------------------------------------------------------
>
> Key: CALCITE-7871
> URL: https://issues.apache.org/jira/browse/CALCITE-7871
> Project: Calcite
> Issue Type: Wish
> Affects Versions: 1.42.0
> Reporter: Zhen Chen
> Assignee: Zhen Chen
> Priority: Minor
> Labels: pull-request-available
>
> Calciteās pull request template outlines contribution guidelines, but these
> rules currently rely on manual review. Given the significant volume of
> AI-generated contributions, manual oversight is prone to oversights;
> therefore, we should implement automated PR checks to enforce consistent
> titling and single-commit requirements.
> Expected behavior:
> - Require exactly one commit per PR. Its subject must exactly match the full
> PR title; an additional commit message body is allowed.
> - Require the PR title, excluding the CALCITE-XXXX prefix, to exactly match
> the Jira issue title. PR and Jira descriptions are not checked.
> - Allow [TEST] Description for test additions and [MINOR] Description for
> other minor changes. These prefixes skip Jira validation but retain the
> commit requirements.
> - Automatically run when a PR is opened, edited, synchronized, reopened, or
> marked ready for review. Merging into main must not trigger this check.
> - Report actionable errors for invalid titles, mismatches, multiple commits,
> or unavailable Jira issues.
> - Update the PR template to explain the rules and exceptions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)