Skip to content

feat: make pr-review-mention an org standard#237

Merged
don-petry merged 4 commits into
mainfrom
feat/pr-review-mention-org-standard
May 11, 2026
Merged

feat: make pr-review-mention an org standard#237
don-petry merged 4 commits into
mainfrom
feat/pr-review-mention-org-standard

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

Summary

  • Extracts all review-dispatch logic from pr-review-mention.yml into a new pr-review-mention-reusable.yml (org single source of truth), following the same pattern as auto-rebase, claude, agent-shield, etc.
  • Slims pr-review-mention.yml in this repo to a thin caller stub using a local ./ ref (matching the auto-rebase.yml pattern).
  • Adds standards/workflows/pr-review-mention.yml — the canonical @v1 template for other repos to copy.
  • Adds pr-review-mention.yml to REQUIRED_WORKFLOWS and the centralized stub-check array in compliance-audit.sh so missing or inline copies surface as compliance findings.
  • Documents everything in ci-standards.md: template table row, required-workflow count (6→7), and new §10 with full spec.
  • Adds scripts/deploy-standard-workflows.sh — deploys standard stubs to all org repos in one command (--dry-run, --workflow, --repo, --force flags).

Test plan

  • CI (actionlint, shellcheck, markdownlint, YAML lint) passes on this PR
  • pr-review-mention-reusable.yml parses cleanly (actionlint)
  • deploy-standard-workflows.sh passes shellcheck
  • Manually mention @petry-review-bot on this PR to confirm the workflow fires end-to-end

🤖 Generated with Claude Code

- Extract all logic from pr-review-mention.yml into pr-review-mention-reusable.yml (org single source of truth)
- Slim pr-review-mention.yml down to a thin caller stub (local ref pattern, matching auto-rebase.yml)
- Add standards/workflows/pr-review-mention.yml canonical template for other repos (@v1 reference)
- Add pr-review-mention.yml to REQUIRED_WORKFLOWS and centralized stub checks in compliance-audit.sh
- Document in ci-standards.md: template table, required-workflow count (6→7), and §10 with full spec
- Add scripts/deploy-standard-workflows.sh to push standard stubs to all org repos in one command

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 11, 2026 03:45
@don-petry don-petry requested a review from a team as a code owner May 11, 2026 03:45
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 22 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cac2a64e-ff6f-4a9b-87f2-2a783d159808

📥 Commits

Reviewing files that changed from the base of the PR and between d3ad991 and 28a9b93.

📒 Files selected for processing (7)
  • .github/workflows/pr-review-mention-reusable.yml
  • .github/workflows/pr-review-mention.yml
  • scripts/compliance-audit.sh
  • scripts/deploy-standard-workflows.sh
  • standards/ci-standards.md
  • standards/codeowners-standard.md
  • standards/workflows/pr-review-mention.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pr-review-mention-org-standard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…eowners-standard

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the pr-review-mention.yml workflow, which triggers a review agent when a specific bot is mentioned or assigned. The changes include updating the compliance audit script and documentation to reflect this new requirement, as well as adding a new deploy-standard-workflows.sh script to automate the distribution of workflow stubs across the organization. Feedback on the new deployment script identifies a naming mismatch for the Claude workflow, portability issues with the base64 command on macOS, and redundant API calls. Additionally, the reviewer noted that the repository limit should be increased for scalability and that several initialized counter variables remain unused.

Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread scripts/deploy-standard-workflows.sh
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR centralizes the PR Review Mention trigger into an org-level reusable workflow and formalizes it as a required org standard, aligning it with existing “thin stub + reusable” patterns (auto-rebase, claude, agent-shield, etc.). It also adds automation to deploy the standard workflow stubs org-wide and updates compliance auditing + documentation accordingly.

Changes:

  • Added pr-review-mention-reusable.yml as the single source of truth and converted repo workflow(s) into thin caller stubs.
  • Updated standards + compliance audit to treat pr-review-mention.yml as an org-required, centralized stubbed workflow.
  • Introduced deploy-standard-workflows.sh to push standard stub workflows into org repositories via the Contents API.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
standards/workflows/pr-review-mention.yml Adds the canonical Tier-1 thin stub template for downstream repos.
standards/ci-standards.md Documents the new standard workflow, increases required workflow count, and adds a full spec section.
scripts/deploy-standard-workflows.sh New org-wide deployment script to upsert standard workflow stubs across repos.
scripts/compliance-audit.sh Makes pr-review-mention.yml required and enforces it as a centralized stub.
.github/workflows/pr-review-mention.yml Converts this repo’s workflow into a thin stub pointing at the local reusable.
.github/workflows/pr-review-mention-reusable.yml Introduces the reusable implementation containing the review-dispatch logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pr-review-mention-reusable.yml
Comment thread standards/ci-standards.md Outdated
Comment thread scripts/compliance-audit.sh
Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread scripts/deploy-standard-workflows.sh Outdated
Comment thread standards/workflows/pr-review-mention.yml Outdated
don-petry and others added 2 commits May 10, 2026 22:53
- Fix claude.yml compliance check: derive uses: from template (not stem-reusable
  heuristic), so the claude→claude-code-reusable name exception is handled automatically
- Combine two API calls (SHA + content) into one fetch_existing call with tab-split output
- Fix base64 portability: try -w 0 (GNU), fall back to -b 0 (BSD/macOS)
- Increase repo list limit to 500 for larger orgs
- Remove unused counter variables (already fixed in prior commit; this replaces the old approach)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Declare GH_PAT_WORKFLOWS in workflow_call secrets block (matching other reusables)
- Clarify fork-PR guard docs: only review_requested path excludes forks; comment
  triggers are base-repo-only by GitHub's event model, protected by trust check
- Fix 'SHA' → 'tag' in standards/workflows/pr-review-mention.yml header comment
- Add --no-archived to gh repo list in deploy script
- Switch --field to --raw-field for content/sha/message to avoid form-encoding issues
  with base64's + and / characters

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@don-petry don-petry merged commit a2b3b46 into main May 11, 2026
19 of 20 checks passed
@don-petry don-petry deleted the feat/pr-review-mention-org-standard branch May 11, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants