Skip to content

feat(gha): close overlapping open PRs at Jaccard 0.8 - #16

Merged
RevealUIStudio merged 1 commit into
mainfrom
feat/duplicate-open-pr-gate
Aug 28, 2026
Merged

RevealUIStudio merged 1 commit into
mainfrom
feat/duplicate-open-pr-gate

Conversation

@RevealUIStudio

Copy link
Copy Markdown
Owner

GitHub-side lock so two harnesses on the same paste cannot both sit open.

Behavior

On pull_request_target (runs from the base branch; no head checkout):

  • Compare changed-path Jaccard of this PR to every older open PR against the same base
  • If ≥ 0.8: comment, close the new PR, fail the duplicate-open-pr check
  • If lower: leave both open (jv#1518 vs #1521 stays two PRs; agency#164 vs #165 would close #165)

Older PR wins. Path overlap is the key. GAP id in the branch is not required. Cursor snowflake heads still hit the lock because the workflow lives on the base.

Override: label not-a-duplicate then reopen.

Verify

node --test .github/actions/duplicate-open-pr/duplicate-open-pr.test.cjs — 10 passed.

Follow-up in agency / revealui / revealui-jv: thin callers pinned to this merge SHA, against test only.

GitHub-side lock so two harnesses on the same paste cannot both sit
open. Older PR wins. pull_request_target, no head checkout. Path
overlap is the key; GAP id in the branch is not required.
@RevealUIStudio
RevealUIStudio merged commit 34a52a6 into main Aug 28, 2026
1 check passed
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