[ 
https://issues.apache.org/jira/browse/CALCITE-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143426#comment-18143426
 ] 

Zhen Chen commented on CALCITE-7871:
------------------------------------

I fully understand your requirements. Sometimes, multiple commits are submitted 
to complete a single PR, which can actually help reviewers conduct their 
reviews more efficiently. In other cases, a single PR might address multiple 
JIRA issues—naturally involving multiple commits (though this is distinct from 
having multiple commits for a single JIRA issue). I have taken all of this into 
account. The current rules allow for multiple commits during the review phase, 
with the requirement that one of the commit messages must match the PR title. A 
check—ensuring the PR contains only a single commit—is triggered only when the 
"LGTM" label is applied. This is designed for users with write access, sparing 
them from manual verification; the check could even be automated to trigger 
whenever the PR is marked as "Approved." This approach was chosen to provide 
more operational flexibility for those with write access. Vladimir Sitnikov 
suggested using the PR title as the commit message at the time of merging—a 
solid approach, also used by projects like `sglang`. However, that method would 
preclude us from including two JIRA issues in a single PR. Ultimately, we need 
to strike a balance between flexibility and constraints. If the preference 
leans toward greater flexibility, we will simply have to invest more time and 
effort into the maintenance of Calcite.

> 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:
> The ruleset in `.asf.yaml` must require the following checks before merging 
> into `main`, with no bypass actors and enforced directly by GitHub: the 15 CI 
> jobs in `main.yml`, Gradle wrapper `Validation`, `SonarCloud` (code 
> scanning), `SonarCloud Code Analysis`, and the two PR metadata checks below. 
> `continuous-integration/jenkins/pr-head` is not required by this ruleset.
>  - `Check PR title`: requires `[CALCITE-<digits>] <Jira summary>` to match 
> the complete PR title and at least one commit subject exactly. Other prefixes 
> skip this check. Title edits and pushes rerun it; Jira-only edits need a 
> rerun.
>  - `Check single commit`: runs only with the `LGTM` label. It verifies that 
> the label was applied by someone with write, maintain, or admin access, then 
> requires exactly one commit. GitHub Approve reviews are separate.
> Existing CI triggers and jobs are unchanged. If a required workflow does not 
> run (for example, `main.yml` ignores PRs changing only `site/**`), its 
> missing checks block merging. GitHub accepts success, skipped, and neutral 
> check conclusions; pending, failed, or cancelled checks block merging. Slow 
> tests and website builds are not added to the required list.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to