Commit Graph

9 Commits

Author SHA1 Message Date
Luke Mino-Altherr
4fe2612c0a Bump reusable-workflow SHA to pick up getOctokit fix
The previously pinned SHA (5d9602ee...) had a runtime bug:
require('@actions/github') throws MODULE_NOT_FOUND because
actions/github-script does not expose @actions/github on the
inline-script Node module-resolution path.

The fix at Comfy-Org/github-workflows@8ec13264 uses github.getOctokit()
instead — which IS the action's documented API for instantiating a
second Octokit client with a different token.

Surfaced by smoke-testing the detector in Comfy-Org/cloud#3917.
2026-05-27 19:34:56 -07:00
Luke Mino-Altherr
668cb0748e Pin reusable workflow to commit SHA + add explicit permissions
Best-practice hardening for the caller of the reusable detector workflow:
- Replace @v1 tag with the immutable commit SHA 5d9602ee... (# v1 comment
  preserves human-readable version info). Satisfies pin-validation tools
  like pinact and zizmor.
- Add explicit minimum permissions (contents: read, pull-requests: read)
  at workflow level so the default permissive token scope is not granted.
2026-05-27 19:00:04 -07:00
Luke Mino-Altherr
e3261c3e37 Replace detector with thin caller of Comfy-Org/github-workflows
Shrinks this workflow from ~210 lines to ~20 by delegating the detection
logic to a centralized reusable workflow in Comfy-Org/github-workflows.
Future changes ship from that one repo and propagate here automatically.
2026-05-27 18:47:23 -07:00
Luke Mino-Altherr
e40cc8f286 Address review feedback: merged_by, idempotency, null guards
- Fetch full PR via pulls.get() to get merged_by (not in simple schema)
- Add idempotency check before issue creation to prevent duplicates
- Use SHA-scoped concurrency group to allow parallel independent runs
- Guard c.user null for deleted GitHub accounts
- Retry issue creation without assignee on 422
- Align policy text: "3 business days" → "3 days" to match implementation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 16:58:09 -07:00
Luke Mino-Altherr
09403bd734 Revert to latest-per-reviewer approval check for OSS repos
Dismissed approvals should NOT be counted in OSS repos — PRs require
current approval at merge time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 16:26:08 -07:00
Luke Mino-Altherr
d1c1e52260 Accept dismissed approvals as valid reviews
"Dismiss stale reviews on new commits" changes APPROVED → DISMISSED
when commits are pushed after approval. The review still happened,
so count DISMISSED as a valid approval.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 16:25:16 -07:00
Luke Mino-Altherr
1cbb4c880d Restrict detector trigger to master branch only
ComfyUI uses master as its default branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 16:21:03 -07:00
Luke Mino-Altherr
2ced468ab6 Address CodeRabbit review feedback
- Support both main and master branches (ComfyUI uses master)
- Dynamically detect branch from push context instead of hardcoding
- Fix approval check to use latest review per reviewer (handles dismissed reviews)
- Add UNREVIEWED_MERGES_TOKEN validation before use
- Add concurrency control to prevent duplicate issues
- Fix version comment: v7 -> v7.1.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 16:14:15 -07:00
Luke Mino-Altherr
863ca98fc2 Add unreviewed merge detector for SOC 2 compliance
Detects PRs merged to main without an approving review and creates
tracking issues in Comfy-Org/unreviewed-merges for audit purposes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 15:07:28 -07:00