Skip to content

fix(ci): fork PR 的定位方式修正(评论与自动合并原本被静默跳过) - #102

Merged
eggfly merged 1 commit into
mainfrom
fix-pr-resolve
Aug 6, 2026
Merged

fix(ci): fork PR 的定位方式修正(评论与自动合并原本被静默跳过)#102
eggfly merged 1 commit into
mainfrom
fix-pr-resolve

Conversation

@eggfly

@eggfly eggfly commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

#101 的自检里发现:listPullRequestsAssociatedWithCommit 只能看到本仓库的 commit,fork PR 的 head commit 查不到,于是特权阶段既没发评论也没执行合并,而 job 仍是 success(静默跳过)。

改成按 head 仓库+分支列 open PR 来定位,并保留对事件 head SHA 的比对,判断依据仍然全部来自可信来源(事件 + API),不碰 artifact。

Made with Cursor

Syncs from CardputerZero/dev-portal (50bd9c4).

listPullRequestsAssociatedWithCommit only sees commits in the repository it is
asked about, so for a fork PR it returned nothing and the privileged stage
silently skipped both the comment and the merge (seen on #101). Listing open PRs
filtered by head does find them, and the head SHA from the event is still
checked, so the decision rests on the same trusted inputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@eggfly
eggfly merged commit 494c68e into main Aug 6, 2026
@eggfly
eggfly deleted the fix-pr-resolve branch August 6, 2026 05:15
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.

1 participant