Skip to content

ci: auto-merge Dependabot patch and minor updates - #102

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/dependabot-automation-780e
Oct 27, 2026
Merged

cursor[bot] merged 3 commits into
mainfrom
cursor/dependabot-automation-780e

Conversation

@Nagi-Inaba

Copy link
Copy Markdown
Owner

Purpose

Dependabot が開く npm、pip、uv の semver patch と minor だけを、必須チェックが通ったあと squash で自動マージできるようにする。major は自動マージせず needs-review を付ける。major、またはチェックが失敗している Dependabot PR は、週次の Codex レビューがコメントだけを残す。

Scope

  • Changed behavior:
    • .github/workflows/dependabot-auto-merge.yml は pull_request_target で default branch の定義だけを実行し、PR の code は checkout しない。作者が dependabot[bot] で、head が同一 repository のときだけ動く。dependabot/fetch-metadata v3.1.0 の update-type が patch または minor、かつ package-ecosystem が npm_and_yarn、npm、pip、uv のとき gh pr merge --auto --squash を実行する。GitHub は必須チェックが通るまでマージしない。major は needs-review を付ける。github-actions は自動マージしない。group 更新は fetch-metadata と同じく最も大きい semver を採用する。
    • .github/workflows/dependabot-codex-review.yml は毎週月曜 09:00 JST(cron 0 0 * * 1)と workflow_dispatch で動く。開いている Dependabot PR のうち major、または失敗チェックがあるものについて openai/codex-action v1.13 が diff、CI、changelog を読む。投稿は gh pr review --comment だけで、承認、マージ、クローズはしない。OPENAI_API_KEY が無い実行は OPENAI_API_KEY is not set. Skipping Codex review. をログに残して成功終了する。
    • docs/github-publication-checklist.md に、この運用に必要な repository 設定を追記した。
  • Explicit non-goals:
    • 監査しきい値の変更、Worker 依存の更新、Python 依存の更新は含まない。それらは別 PR fix: Worker の high 依存監査を通す #101。
    • Codex に write 権限を渡さない。workflow から PR を承認しない。

Verification

  • actionlint 1.7.12(ShellCheck 0.9.0 あり)を両方の workflow に実行し、指摘は 0 件。
  • ruff check と ruff format --check は .github/scripts/dependabot_codex_review.py に対して成功。self-check も成功。
  • 読み取り専用の select は、開いている Dependabot PR を major または失敗チェックで分類した。chore: bump the worker-dependencies group across 1 directory with 4 updates #96 の packet 生成も確認した。コメントは投稿していない。
  • python3 scripts/verify_repository_boundary.py は repository-boundary: ok。
  • Python と Worker のテスト一式は未実行。この差分は workflow、選定 script、公開チェックリストだけである。
  • この workflow の GitHub-hosted 実行はまだ無い。workflow_dispatch は行っていない。

Public-data safety checklist

  • Tests and examples use synthetic fixtures only.
  • No PMGS source package, generated SQLite database, public export tree, registration material, credential, or local absolute path is included.
  • Official source text remains separate from derived metadata or interpretation.
  • Public artifacts still exclude source archives and canonical database downloads.
  • Python and Worker checks relevant to this change pass.
  • Documentation and requirement evidence are updated when behavior changes.

オーナー設定

この PR を merge しただけでは自動マージも Codex レビューも始まらない。次を repository 設定で行う。

  1. Actions secret OPENAI_API_KEY を追加する。Settings → Secrets and variables → Actions → Repository secrets。週次レビューは schedule と workflow_dispatch だけで、Dependabot イベントでは起動しない。Dependabot secrets への追加は不要である。secret が無い週次実行はログを残して成功終了し、Codex は呼ばれない。
  2. Allow auto-merge を有効にする。現在の repository は allow_auto_merge: false。Settings → General → Pull Requests → Allow auto-merge。squash merge は既に有効(allow_squash_merge: true)なので、その設定は維持する。無効のままだと gh pr merge --auto が失敗し、自動マージ job は赤になる。
  3. main の branch protection または ruleset で、次の ci.yml job 名を必須 status check にする。名前は表示どおり。
    • Python 3.12 on ubuntu-latest
    • Python 3.12 on windows-latest
    • Python 3.12 on macos-latest
    • Python 3.13 on ubuntu-latest
    • Python 3.14 on ubuntu-latest
    • Python 3.14 on windows-latest
    • Python 3.14 on macos-latest
    • Installed wheel on ubuntu-latest
    • Installed wheel on windows-latest
    • Installed wheel on macos-latest
    • Installed wheel on Python 3.13
    • Synthetic determinism on ubuntu-latest
    • Synthetic determinism on windows-latest
    • Synthetic determinism on macos-latest
    • Compare synthetic determinism
    • Cloudflare Worker on Node 22
  4. CodeQL は必須にしない。 Dependabot PR では CodeQL が skipping になる。必須にすると patch/minor の auto-merge は完了しない。Dependabot auto-merge job 自体も必須にしない。Dependabot 以外の PR ではその job は skip され、Allow auto-merge が無効な間は失敗する。
  5. 承認レビューを必須にしない(無人マージが目的の場合)。この workflow は承認しない。必須承認があると、チェックが通っても人の approve までマージされない。
  6. Actions の権限。 「Allow GitHub Actions to create and approve pull requests」は無効のままにする。workflow 既定の permissions は contents: read。write は自動マージ job だけが contents: write、issues: write、pull-requests: write を宣言する。Codex job は pull-requests: write を持たず、コメント job だけが review comment を投稿する。Organization policy が GITHUB_TOKEN の write を全面禁止している場合は、workflow 内の permissions では auto-merge を有効にできない。
Open in Web Open in Cursor 

Enable squash auto-merge for npm, pip, and uv patch and minor updates,
label major updates, and add a weekly comment-only Codex review.

Co-authored-by: NAGI <Nagi-Inaba@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T19:07:23.333641Z 70db134 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70db134ecf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/dependabot-auto-merge.yml
Nagi-Inaba and others added 2 commits October 27, 2026 11:56
Dependabot auto-merge never checks out the pull request, so gh label
create cannot infer the repo. Set GH_REPO and pass --repo on every gh
command in that job.

Co-authored-by: NAGI <Nagi-Inaba@users.noreply.github.com>
@cursor
cursor Bot merged commit 5b769d2 into main Oct 27, 2026
36 checks 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.

1 participant