Compare commits

...

12 Commits

Author SHA1 Message Date
81728d350d Bump detector SHA to pick up search-query (is:issue) fix
Amp-Thread-ID: https://ampcode.com/threads/T-019e6bd0-ca39-7537-9c91-0ec117ac85ea
Co-authored-by: Amp <amp@ampcode.com>
2026-05-27 19:53:02 -07:00
612269bff2 Bump detector SHA to pick up Octokit-constructor fix
Bumps reusable workflow to Comfy-Org/github-workflows@f6b3855, which
swaps github.getOctokit() (not a function in actions/github-script v7
inline-script context) for new github.constructor({ auth: token }) —
reusing the plugin-loaded Octokit class off the existing instance,
zero module resolution required.

Surfaced by the second cloud smoke test (#3920).
2026-05-27 19:45:11 -07:00
8660495cce Bump detector SHA to pick up PR-lookup retry + fallback
Bumps reusable workflow to Comfy-Org/github-workflows@ddc26ca, which
adds retry + commit-message fallback to listPullRequestsAssociatedWithCommit.

The previous SHA (8ec13264) hit GitHub's eventual consistency on that
endpoint when the cloud smoke test merged — the API returned [] for
the merge commit immediately after the merge, causing the detector to
exit with 'No merged PR found' even though the PR existed. The fix
retries with backoff and falls back to parsing '(#N)' from the squash
commit subject.
2026-05-27 19:41:38 -07:00
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
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
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
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
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
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
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
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
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

View File

@ -0,0 +1,24 @@
name: Detect Unreviewed Merge
# SOC 2 compliance — reusable workflow lives in Comfy-Org/github-workflows,
# tracking issues are filed in Comfy-Org/unreviewed-merges.
on:
push:
branches: [master]
concurrency:
group: detect-unreviewed-merge-${{ github.sha }}
cancel-in-progress: false
permissions:
contents: read
pull-requests: read
jobs:
detect:
uses: Comfy-Org/github-workflows/.github/workflows/detect-unreviewed-merge.yml@4d9cb6b87f953bb7cd69954280e1465fb9bd2040 # v1
with:
approval-mode: latest-per-reviewer
secrets:
UNREVIEWED_MERGES_TOKEN: ${{ secrets.UNREVIEWED_MERGES_TOKEN }}