Skip to content

ci: add /request-review and /unrequest-review comment commands#4986

Merged
Yicong-Huang merged 3 commits intoapache:mainfrom
Ma77Ball:feat/requestReview
May 9, 2026
Merged

ci: add /request-review and /unrequest-review comment commands#4986
Yicong-Huang merged 3 commits intoapache:mainfrom
Ma77Ball:feat/requestReview

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

@Ma77Ball Ma77Ball commented May 8, 2026

What changes were proposed in this PR?

  • Renamed .github/workflows/take-commands.yml → .github/workflows/comment-commands.yml, since the workflow now handles more than just /take and /untake.
  • Added a new request-review job that handles two new slash commands on PRs:
    • /request-review @alice @bob requests reviews from the listed users/teams.
    • /unrequest-review @alice cancels a pending review request.
  • Authorization: PR author (fast path) or any committer with write/maintain/admin permission. Anyone else is rejected and logged.
  • Supports both individual users (@alice) and teams (@org/team-name); routes them to the correct API bucket.
  • Strips self-mentions before calling the API so the atomic call doesn't fail over a single bad name.
  • Workflow renamed Issue take commands → Comment commands and granted pull-requests: write.
  • Avoids the /review namespace so it stays free for future use (e.g., self-review).

Any related issues, documentation, or discussions?

Closes: #4975

How was this PR tested?

Tested on my local fork.

Was this PR authored or co-authored using generative AI tooling?

Co-Authored with Claude Opus 4.7 in Compliance with ASF

@github-actions github-actions Bot added feature ci changes related to CI labels May 8, 2026
@Ma77Ball
Copy link
Copy Markdown
Contributor Author

Ma77Ball commented May 8, 2026

@aglinxinyuan please review.

Copy link
Copy Markdown
Contributor

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

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

LGTM! This should be useful! Left some minor comments

Comment thread .github/workflows/comment-commands.yml Outdated
Comment thread .github/workflows/comment-commands.yml
@Yicong-Huang
Copy link
Copy Markdown
Contributor

Yicong-Huang commented May 8, 2026

@aglinxinyuan please review.

Can you try it on this PR? I.e., Use /request-review to request review from @aglinxinyuan. It supposed to work.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.72%. Comparing base (deb0e2c) to head (83c30bc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #4986   +/-   ##
=========================================
  Coverage     42.72%   42.72%           
  Complexity     2185     2185           
=========================================
  Files          1031     1031           
  Lines         38152    38152           
  Branches       4004     4004           
=========================================
  Hits          16301    16301           
  Misses        20831    20831           
  Partials       1020     1020           
Flag Coverage Δ
access-control-service 39.53% <ø> (ø)
agent-service 33.72% <ø> (ø)
amber 43.21% <ø> (ø)
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 32.18% <ø> (ø)
frontend 33.08% <ø> (ø)
python 88.90% <ø> (ø)
workflow-compiling-service 47.72% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

Ma77Ball commented May 8, 2026

I'm not sure this will work on this PR. Workflows typically need to be on the main branch to run, and since I renamed it, it won't be picked up here.

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

Ma77Ball commented May 8, 2026

/request-review @aglinxinyuan

@Yicong-Huang
Copy link
Copy Markdown
Contributor

@Ma77Ball do you want to handle the comments first so that we can merge and start to use/test this?

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

Ma77Ball commented May 9, 2026

Yes, I'll add them now. I was working on another PR, but I'm having issues with the license.

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

Ma77Ball commented May 9, 2026

@Yicong-Huang test here: Matthew-G-Ball#1

@Yicong-Huang Yicong-Huang enabled auto-merge (squash) May 9, 2026 00:29
@Yicong-Huang Yicong-Huang merged commit 2652315 into apache:main May 9, 2026
23 checks passed
@Ma77Ball Ma77Ball deleted the feat/requestReview branch May 9, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-triage: support /review and /unreview comments to request reviewers on PRs

3 participants