Lightweight coding agent that runs in your terminal
Rust
ci: check out PR head commits in workflows (#21835)
Michael Bolin24111790f060
diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.ymlindex 627993c811..cc3968d306 100644--- a/.github/workflows/bazel.yml+++ b/.github/workflows/bazel.yml@@ -58,6 +58,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Check rusty_v8 MODULE.bazel checksums@@ -152,6 +153,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Prepare Bazel CI@@ -237,6 +239,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Prepare Bazel CI@@ -326,6 +329,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Prepare Bazel CIdiff --git a/.github/workflows/blob-size-policy.yml b/.github/workflows/blob-size-policy.ymlindex e7817a9f65..779198ee02 100644--- a/.github/workflows/blob-size-policy.yml+++ b/.github/workflows/blob-size-policy.yml@@ -10,6 +10,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}fetch-depth: 0persist-credentials: false@@ -18,8 +19,8 @@ jobs:shell: bashrun: |set -euo pipefail- echo "base=$(git rev-parse HEAD^1)" >> "$GITHUB_OUTPUT"- echo "head=$(git rev-parse HEAD^2)" >> "$GITHUB_OUTPUT"+ echo "base=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_OUTPUT"+ echo "head=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT"- name: Check changed blob sizesenv:diff --git a/.github/workflows/cargo-deny.yml b/.github/workflows/cargo-deny.ymlindex 94967e7e79..f20d09e112 100644--- a/.github/workflows/cargo-deny.yml+++ b/.github/workflows/cargo-deny.yml@@ -16,6 +16,7 @@ jobs:- name: Checkoutuses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Install Rust toolchaindiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 3754155912..a1c60acc26 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -14,6 +14,7 @@ jobs:- name: Checkout repositoryuses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Verify codex-rs Cargo manifests inherit workspace settingsdiff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.ymlindex d4a8469a53..aaa15cf40d 100644--- a/.github/workflows/codespell.yml+++ b/.github/workflows/codespell.yml@@ -20,6 +20,7 @@ jobs:- name: Checkoutuses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Annotate locations with typosuses: codespell-project/codespell-problem-matcher@b80729f885d32f78a716c2f107b4db1025001c42 # v1.1.0diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.ymlindex 52322913e5..75c5c33601 100644--- a/.github/workflows/rust-ci.yml+++ b/.github/workflows/rust-ci.yml@@ -16,6 +16,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}fetch-depth: 0persist-credentials: false- name: Detect changed paths (no external action)@@ -64,6 +65,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0with:@@ -82,6 +84,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2.62.49@@ -101,6 +104,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0- name: Install nightly argument-comment-lint toolchain@@ -179,6 +183,7 @@ jobs:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2if: ${{ 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 Bazelif: ${{ steps.argument_comment_lint_gate.outputs.run == 'true' }}diff --git a/.github/workflows/sdk.yml b/.github/workflows/sdk.ymlindex cc26a4785a..0f9065941b 100644--- a/.github/workflows/sdk.yml+++ b/.github/workflows/sdk.yml@@ -15,6 +15,7 @@ jobs:- name: Checkout repositoryuses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Install Linux bwrap build dependenciesdiff --git a/.github/workflows/v8-canary.yml b/.github/workflows/v8-canary.ymlindex 50ec353c2e..6e71367d1f 100644--- a/.github/workflows/v8-canary.yml+++ b/.github/workflows/v8-canary.yml@@ -42,6 +42,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Set up Python@@ -78,6 +79,7 @@ jobs:steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2with:+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}persist-credentials: false- name: Set up Bazel