Skip to content

fix(ci): skip CodeQL gate wait on Dependabot PRs#122

Merged
keting merged 1 commit into
mainfrom
fix/codeql-gate-skip-dependabot
May 20, 2026
Merged

fix(ci): skip CodeQL gate wait on Dependabot PRs#122
keting merged 1 commit into
mainfrom
fix/codeql-gate-skip-dependabot

Conversation

@keting
Copy link
Copy Markdown
Owner

@keting keting commented May 20, 2026

Summary

  • CodeQL Required 在检测到 src/backend/** / src/frontend/** / .github/workflows/** 变化时会轮询 Analyze (...) check runs,但 GitHub-managed CodeQL default setup 不会在 Dependabot 创建的 PR 上发起 Analyze。结果 gate 永远等不到 check 出现,15 分钟后超时失败(参见 chore(deps): bump idna from 3.13 to 3.15 in /src/backend #120 的运行日志)。
  • 在 gate 脚本里加一个 Dependabot 判定分支,参照现有 fork PR 的处理方式,识别到 dependabot[bot] 作者后直接放行并记录原因。
  • 不改变其它 PR 的行为;非 Dependabot PR 仍按原逻辑轮询所需的 Analyze check。

Test plan

  • 等下一个 Dependabot 升级 PR 上 CodeQL Required 直接通过,且日志里出现 Skipping CodeQL gate for Dependabot pull request ...
  • 在一个普通分支 PR 上确认 gate 仍正常轮询 Analyze (python) / Analyze (javascript-typescript) / Analyze (actions)

🤖 Generated with Claude Code

The CodeQL Required gate polls for GitHub-managed Analyze check runs,
but the default setup does not emit them for Dependabot-authored pull
requests. The gate timed out (e.g. PR #120) even though the change was
only a lockfile bump that CodeQL would not analyze anyway.

Detect Dependabot PRs and skip the wait, mirroring the existing
fork-pull-request handling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@keting keting merged commit 0f3f34a into main May 20, 2026
9 checks passed
@keting keting deleted the fix/codeql-gate-skip-dependabot branch May 20, 2026 06:31
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