Skip to content

GH-55163: [CI] Replace the PR Limit workflow with the .asf.yaml pull request creation cap - #55164

Merged
raulcd merged 2 commits into
apache:mainfrom
rok:gh-pr-limit-creation-cap
Nov 5, 2026
Merged

raulcd merged 2 commits into
apache:mainfrom
rok:gh-pr-limit-creation-cap

Conversation

@rok

@rok rok commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

NOTE: do not merge before apache/infrastructure-asfyaml#135 is merged.
See #55163 and #51200.

What changes are included in this PR?

Removes .github/workflows/pr_limit.yml worflow and uses a .asf.yaml setting instead.
Committers, collaborators and pull_requests.creation_cap.bypass_users list in .asf.yaml are exempt from the cap.

Are these changes tested?

Hopefully by CI.

Are there any user-facing changes?

Only CI users.

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Copilot AI balanced review requested due to automatic review settings October 23, 2026 17:30
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55163 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

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.

🟢 Approval recommended

The supported configuration, workflow removal, and documentation consistently implement the intended policy change, with no unresolved findings.

No open issues 🎉

What changed in this PR

Replaces Arrow’s PR-limit workflow with GitHub’s native creation cap configured through .asf.yaml, as proposed in #55163.

Changes:

  • Caps contributors without write access at three open pull requests, including drafts.
  • Removes the workflow, enforcement script, and automatic closure message.
  • Updates contributor documentation to explain creation-time blocking and the removal of the triage-access exemption.
File Description
docs/​source/​developers/​bug_reports.rst Documents the native cap and updated access exemption.
.github/​workflows/​pr_limit/​comment.md Removes the obsolete closure message.
.github/​workflows/​pr_limit/​check.js Removes custom PR-limit enforcement.
.github/​workflows/​pr_limit.yml Removes the replaced GitHub Actions workflow.
.asf.yaml Enables the three-PR creation cap, including drafts.

Review effort: Balanced

@rok rok changed the title GH-55163: [CI] Replace the PR Limit workflow with the .asf.yaml pull request creation cap DO-NOT-MERGE - GH-55163: [CI] Replace the PR Limit workflow with the .asf.yaml pull request creation cap Oct 23, 2026
@github-actions
github-actions Bot marked this pull request as draft October 23, 2026 17:48

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That makes sense but my only concern is that now collaborators won't be able to have more than 3 PRs opened until the bypass users PR is merged:

… pull request creation cap

GitHub's native pull request creation cap can now be configured in
.asf.yaml (apache/infrastructure-asfyaml#111), so configure it there
with the same limit and remove the workflow and its helper script.
Draft pull requests are included to match the workflow's behaviour.

Update the contributor docs: GitHub refuses to open a pull request over
the limit instead of closing it afterwards with a comment, and the cap
only exempts users with write access.
@rok
rok force-pushed the gh-pr-limit-creation-cap branch from f16b2d7 to 96bc5df Compare November 4, 2026 13:14
@rok rok changed the title DO-NOT-MERGE - GH-55163: [CI] Replace the PR Limit workflow with the .asf.yaml pull request creation cap GH-55163: [CI] Replace the PR Limit workflow with the .asf.yaml pull request creation cap Nov 4, 2026
@rok
rok marked this pull request as ready for review November 4, 2026 13:16
Copilot AI balanced review requested due to automatic review settings November 4, 2026 13:16

Copilot AI left a comment

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.

🟡 Changes recommended

The bypass list omits seven configured collaborators, causing those with triage-only access to lose their existing exemption and be blocked from opening a fourth PR.

1 open issue

Review effort: Balanced

Comment thread .asf.yaml Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues are reported for the migration to GitHub’s native pull request cap.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@rok
rok requested a review from thisisnic November 4, 2026 14:44
@rok

rok commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

Now what apache/infrastructure-asfyaml#135 was merged we can use ASF PR cap mechanism and use bypass_users list to bypass PR that cap for given users.

GitHub did add a way to introduce a cap and bypass it if a user has an arbitrary numbers of PRs merged (#55163 (comment)). However this is not yet available through .asf.yaml mechanism yet. We should transition to it once it becomes available.

@Reranko05

Copy link
Copy Markdown
Collaborator

@rok One question: should draft PRs also count towards the creation cap? Since drafts are still work in progress and aren't necessarily ready for review, it might be worth considering whether they should be excluded from the limit. I wonder if counting them might be a bit restrictive for legitimate contributors

@rok

rok commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

should draft PRs also count towards the creation cap? Since drafts are still work in progress and aren't necessarily ready for review, it might be worth considering whether they should be excluded from the limit. I wonder if counting them might be a bit restrictive for legitimate contributors

The goal of this is to reduce spam PRs so reading https://github.com/apache/arrow/pulls becomes realistically doable again. I'm unsure but I'd slightly rather first count drafts towards a cap and add legitimate users to bypass_users as we go or even setting include_drafts: false if needed.
What do others think? @raulcd @thisisnic @pitrou ?

@Reranko05 Reranko05 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

first count drafts towards a cap and add legitimate users to bypass_users as we go

Makes sense. LGTM!

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is great! Thanks @rok

I'll merge this now because the functionality is virtually the same and we want to get rid of the pull_request_target event on the workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants