Skip to content

ci: run CI once per PR push and scope Pages permissions to the deploy job - #404

Merged
glebedel merged 1 commit into
mainfrom
s2d2/audit-ci-triggers
Nov 13, 2026
Merged

glebedel merged 1 commit into
mainfrom
s2d2/audit-ci-triggers

Conversation

@glebedel

@glebedel glebedel commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

ci.yaml and dry-publish.yaml triggered on push for every branch as well as on pull_request, so each push to a PR branch ran both workflows twice, including the ai-peer-range matrix and conformance. push is now limited to main. ci.yaml also granted pages: write and id-token: write to every job; they now sit on deploy-coverage, the only job that deploys Pages, with contents: read at the top.

Trade-off: a branch with no open PR no longer gets CI on push.

Proof: runs per head

gh run list --commit <head> on this PR against #401, which still has the old triggers:

Workflow #404 at 86ea3be #401 at dcfa680 (old triggers)
CI 1 (pull_request) 2 (push + pull_request)
Dry Run Publish (pkg.pr.new) 1 (pull_request) 2 (push + pull_request)
Check PR title 2 (pull_request) 2 (pull_request)

All jobs pass on this head (14 pass, 4 skipped main-only jobs). deploy-coverage keeps what actions/deploy-pages needs and only runs on main, so its permissions are exercised on the first main push after merge.

Gates

Gate Result Head
Repo skills None in repo (Nix-managed, gitignored). Read .claude/rules/* (nix-workflow, development-workflow .yaml naming). release-please not applied 86ea3be
/forge:forge Ran: no counted files (workflow YAML) 86ea3be
Security scan (security-reviewer + Aikido) No findings: permissions only narrow, no pull_request_target. Aikido's open critical (template injection in .github/actions/setup-nix/action.yaml) is in a file this PR does not touch 86ea3be
Codex security pass No findings 86ea3be
/security-review Pass 86ea3be
/code-review No findings 86ea3be
Dogfood Run counts above 86ea3be
CI Green 86ea3be
Review threads 0 unresolved 86ea3be

Post-merge validation

On the first push to main after merge: CI runs once, coverage and deploy-coverage succeed (Pages deploy with the job-level permissions). Regression signal: deploy-coverage failing with a permissions error.

Requested by guillaume@stackone.com in Slack (repo audit thread).

🤖 Generated with Claude Code

… job

CI and the pkg.pr.new dry publish trigger on both push (any branch) and
pull_request, so every push to a PR branch runs both workflows twice.
Limit push to main. Move pages: write and id-token: write from the
workflow level to deploy-coverage, the only job that deploys Pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
@glebedel
glebedel requested a review from a team as a code owner November 10, 2026 20:34
@glebedel glebedel self-assigned this Nov 10, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T20:35:22.285315Z 86ea3be 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.

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@404

commit: 86ea3be

@glebedel
glebedel requested a review from StuBehan November 11, 2026 14:08
@glebedel
glebedel merged commit c32365c into main Nov 13, 2026
20 checks passed
@glebedel
glebedel deleted the s2d2/audit-ci-triggers branch November 13, 2026 11:44
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