mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Run required CI against pull request merge commits (#38051)
## Why Checking only the pull request head can miss conflicts with changes already on `main`. ## What changed Remove explicit pull request head refs from required workflow checkouts so GitHub Actions checks out the synthetic merge commit by default. Keep the blocking gate on the same combined revision as the child workflows it evaluates, and document the merge-commit policy in the workflow README. GitOrigin-RevId: dc357caa5dc43f46b9b9a0edea6ee560b4fe8efb
This commit is contained in:
committed by
copyberry
parent
eea28321ad
commit
965b9f263a
3
.github/workflows/README.md
vendored
3
.github/workflows/README.md
vendored
@@ -4,6 +4,9 @@ The workflows in this directory are split so that pull requests get fast, review
|
||||
|
||||
## Pull Requests
|
||||
|
||||
- Required checks run against GitHub's synthetic merge commit, not the pull
|
||||
request head alone. This includes changes already on `main` and catches
|
||||
conflicts before they reach the branch.
|
||||
- `bazel.yml` is the main pre-merge verification path for Rust code.
|
||||
It runs Bazel `test` and Bazel `clippy` on the supported Bazel targets,
|
||||
including the generated Rust test binaries needed to lint inline `#[cfg(test)]`
|
||||
|
||||
5
.github/workflows/bazel.yml
vendored
5
.github/workflows/bazel.yml
vendored
@@ -54,7 +54,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Prepare Bazel CI
|
||||
@@ -154,7 +153,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Test BuildBuddy Bazel wrapper
|
||||
@@ -272,7 +270,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Prepare Bazel CI
|
||||
@@ -365,7 +362,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Prepare Bazel CI
|
||||
@@ -465,7 +461,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Prepare Bazel CI
|
||||
|
||||
1
.github/workflows/blob-size-policy.yml
vendored
1
.github/workflows/blob-size-policy.yml
vendored
@@ -15,7 +15,6 @@ jobs:
|
||||
mode: audit
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
|
||||
11
.github/workflows/blocking-ci.yml
vendored
11
.github/workflows/blocking-ci.yml
vendored
@@ -60,17 +60,10 @@ jobs:
|
||||
- sdk
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
# Keep the helper on the same revision as the caller and child workflows.
|
||||
# CI workflow uploads are restricted, so this repository does not need a
|
||||
# separate trusted-base checkout for the terminal policy step. Using the
|
||||
# PR head also lets the introducing PR exercise a newly added helper.
|
||||
#
|
||||
# During the initial rollout, PR branches created before
|
||||
# check_ci_results.py exists must rebase onto main before this gate can
|
||||
# run.
|
||||
# Keep the helper on the same combined revision as the child workflows so
|
||||
# the merge gate evaluates the exact candidate they validated.
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Require successful dependencies
|
||||
|
||||
1
.github/workflows/cargo-deny.yml
vendored
1
.github/workflows/cargo-deny.yml
vendored
@@ -13,7 +13,6 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ./.github/actions/setup-ci
|
||||
|
||||
1
.github/workflows/codespell.yml
vendored
1
.github/workflows/codespell.yml
vendored
@@ -17,7 +17,6 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
- name: Annotate locations with typos
|
||||
uses: codespell-project/codespell-problem-matcher@b80729f885d32f78a716c2f107b4db1025001c42 # v1.1.0
|
||||
|
||||
1
.github/workflows/repo-checks.yml
vendored
1
.github/workflows/repo-checks.yml
vendored
@@ -13,7 +13,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ./.github/actions/setup-ci
|
||||
|
||||
5
.github/workflows/rust-ci.yml
vendored
5
.github/workflows/rust-ci.yml
vendored
@@ -16,7 +16,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Detect changed paths (no external action)
|
||||
@@ -69,7 +68,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/setup-ci
|
||||
- uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0
|
||||
@@ -95,7 +93,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/setup-ci
|
||||
- uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0
|
||||
@@ -120,7 +117,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/setup-ci
|
||||
- uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0
|
||||
@@ -207,7 +203,6 @@ jobs:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
if: ${{ steps.argument_comment_lint_gate.outputs.run == 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
- name: Run argument comment lint on codex-rs via Bazel
|
||||
if: ${{ steps.argument_comment_lint_gate.outputs.run == 'true' }}
|
||||
|
||||
2
.github/workflows/sdk.yml
vendored
2
.github/workflows/sdk.yml
vendored
@@ -13,7 +13,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Test Python SDK
|
||||
@@ -55,7 +54,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Linux bwrap build dependencies
|
||||
|
||||
8
.github/workflows/v8-canary.yml
vendored
8
.github/workflows/v8-canary.yml
vendored
@@ -17,9 +17,9 @@ jobs:
|
||||
metadata:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
# A stale PR head can contain the old detector, which does not emit this
|
||||
# output. Missing must mean "run" so older branches cannot silently skip
|
||||
# the expensive V8 coverage while reporting success.
|
||||
# Older revisions can contain a detector that does not emit this output.
|
||||
# Missing must mean "run" so they cannot silently skip the expensive V8
|
||||
# coverage while reporting success.
|
||||
canary_required: ${{ steps.changes.outputs.canary_required || 'true' }}
|
||||
v8_version: ${{ steps.v8_version.outputs.version }}
|
||||
windows_source_required: ${{ steps.changes.outputs.windows_source_required }}
|
||||
@@ -27,7 +27,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
@@ -173,7 +172,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Bazel
|
||||
|
||||
Reference in New Issue
Block a user