Clean up CI triggers and required checks#314
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refines the repository’s GitHub Actions setup to reduce duplicate CI runs, remove unreachable/obsolete CI paths, and provide a single stable required-check context for branch protection.
Changes:
- Restricts CI
pushruns tomain/nextand relies onpull_requestruns for PR validation, with concurrency cancellation for stale runs. - Adds a gem packaging validation job (
bundle exec rake build:gem) to CI. - Introduces a fail-closed
ci-requiredaggregator job intended to be the single branch-protection required check, and enables CodeQL scanning for PRs targetingmain.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/codeql.yml |
Adds pull_request trigger and concurrency cancellation for CodeQL runs; adjusts job permissions comments. |
.github/workflows/ci.yml |
Simplifies triggers, adds concurrency cancellation, adds gem packaging job, and adds a stable ci-required gate job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Reviewed the full diff and workflow routing at b135f41. The reusable workflow centralizes the shared checks, preserves the OpenAI/Stainless event split, scopes permissions appropriately, and the live PR run plus independent actionlint validation are clean. No substantive issues found; before merge, coordinate the ruleset change from lint to ci / ci-required noted in the PR body.
Summary
ci / ci-requiredbranch-protection gatemainpull requests with CodeQL and cancel stale runsWhy
This workflow is shared byte-for-byte with
stainless-sdks/openai-ruby. The previous shape launched bothpushandpull_requestworkflows for same-repository PRs, producing an ambiguous pile of successful and skipped checks. Simply limiting pushes tomain/nextwould break Stainless: it validates generated feature branches onpush, uses Depot, and publishes installable artifacts for those commits.The router preserves both operating modes. On this repository, a feature-branch
pushcollapses to one skippedcirouter and the PR event runs the real checks. In Stainless, feature-branch pushes run the real checks and artifact publishing, while same-repository PR events collapse to the router. The production PR also showsci / stainless artifactas explicitly skipped because that least-privilege OIDC job exists only for Stainless.Validation
actionlintv1.7.12zizmor --pedantic(no findings)./scripts/lint./scripts/test(467 runs, 1,512 assertions)bundle exec rake build:gemci / ci-requiredall greenBranch protection
Require the single
ci / ci-requiredcheck. Keep the repository’s separate code-scanning rule for CodeQL rather than requiring individual matrix check names.