Skip to content

Update docs agent self-approval guard#1333

Merged
SahilAujla merged 2 commits into
mainfrom
update-self-approval-guard
May 26, 2026
Merged

Update docs agent self-approval guard#1333
SahilAujla merged 2 commits into
mainfrom
update-self-approval-guard

Conversation

@SahilAujla
Copy link
Copy Markdown
Collaborator

Summary

  • Run the docs-agent self-approval guard on PR update events as well as review submissions, so pushes to an already-reviewed PR refresh the required check.
  • Evaluate the current PR head on push-style events and the reviewed commit on approval events.
  • Count historical non-requester approvals instead of only currently active approvers, while still dismissing requester self-approvals on submitted approval reviews.

Test plan

  • pnpm exec prettier --check .github/workflows/no-originator-self-approval.yml
  • node --input-type=module -e "import fs from 'node:fs'; import yaml from 'js-yaml'; const doc = yaml.load(fs.readFileSync('.github/workflows/no-originator-self-approval.yml','utf8')); if (!doc.on?.pull_request || !doc.on?.pull_request_review) throw new Error('missing expected triggers'); console.log(JSON.stringify(doc.on));"
  • pnpm dlx github-actionlint .github/workflows/no-originator-self-approval.yml
  • Exercised the historical approval query against alchemyplatform/docs#1321; it finds prior non-requester approvals.

Made with Cursor

Run the guard on PR updates and count historical non-requester approvals so pushes after review do not leave the required check stuck.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SahilAujla SahilAujla requested a review from a team as a code owner May 26, 2026 18:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview May 26, 2026, 8:54 PM

Comment thread .github/workflows/no-originator-self-approval.yml Outdated
Keep the self-approval guard focused on PR creation and pushes while review submissions continue to handle approval dismissal.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SahilAujla SahilAujla merged commit 3655809 into main May 26, 2026
9 checks passed
@SahilAujla SahilAujla deleted the update-self-approval-guard branch May 26, 2026 21:17
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