[
https://issues.apache.org/jira/browse/CALCITE-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhen Chen updated CALCITE-7871:
-------------------------------
Description:
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}}|file:///Applications/Typora.app/Contents/Resources/.asf.yaml]
requires the 15 CI jobs in
{{main.yml}}, Gradle wrapper {{Validation}}, and the two PR metadata checks
below to merge into {{main}}, with no bypass actors. GitHub enforces these
checks directly. {{continuous-integration/jenkins/pr-head}}, {{SonarCloud}}
(code scanning), and {{SonarCloud Code Analysis}} are 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 {{Approved}} 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.
When adding or renaming a required check, update its context in {{.asf.yaml}}.
ASF installs the ruleset from the default branch.
was:
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.
> 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}}|file:///Applications/Typora.app/Contents/Resources/.asf.yaml]
> requires the 15 CI jobs in
> {{main.yml}}, Gradle wrapper {{Validation}}, and the two PR metadata checks
> below to merge into {{main}}, with no bypass actors. GitHub enforces these
> checks directly. {{continuous-integration/jenkins/pr-head}}, {{SonarCloud}}
> (code scanning), and {{SonarCloud Code Analysis}} are 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 {{Approved}} 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.
> When adding or renaming a required check, update its context in {{.asf.yaml}}.
> ASF installs the ruleset from the default branch.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)