From d4cd5bf7c78bf6e645210a2e132a5a771d0fda53 Mon Sep 17 00:00:00 2001 From: Dave Wilding Date: Fri, 18 Sep 2026 22:24:14 +0800 Subject: [PATCH 1/2] ci: pass --repo to gh commands in wait-checks --- .github/workflows/release.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 53077a4..38ed03c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -55,16 +55,19 @@ jobs: steps: - name: Wait for checks id: wait + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} run: | set -euo pipefail sha="${{ github.sha }}" release=false # Wait for all other workflow runs on this SHA to complete. - other_runs="$(gh run list --branch main --limit 50 --json databaseId,headSha --jq ".[] | select(.headSha == \"${sha}\") | .databaseId")" + other_runs="$(gh run list --repo "$REPO" --branch main --limit 50 --json databaseId,headSha --jq ".[] | select(.headSha == \"${sha}\") | .databaseId")" other_runs="$(echo "$other_runs" | grep -v "${{ github.run_id }}" || true)" all_passed=true for run in $other_runs; do - if ! gh run watch "$run" --exit-status >/dev/null 2>&1; then + if ! gh run watch "$run" --repo "$REPO" --exit-status >/dev/null 2>&1; then all_passed=false fi done @@ -72,8 +75,6 @@ jobs: release=true fi echo "release=$release" >> "$GITHUB_OUTPUT" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} create-draft: runs-on: ubuntu-latest From 346405ac6ad569807f4425fd65fe167e6b103e5b Mon Sep 17 00:00:00 2001 From: Dave Wilding Date: Fri, 18 Sep 2026 22:34:19 +0800 Subject: [PATCH 2/2] ci: pass --repo to gh commands in create-draft --- .github/scripts/write_release_notes.py | 15 ++++++++++++++- .github/workflows/release.yaml | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/scripts/write_release_notes.py b/.github/scripts/write_release_notes.py index 987e6bf..af55f6c 100644 --- a/.github/scripts/write_release_notes.py +++ b/.github/scripts/write_release_notes.py @@ -15,7 +15,18 @@ def gh(*args: str) -> str: def latest_tag() -> str: - return gh("release", "list", "-L", "1", "--json", "tagName", "-q", ".[0].tagName") + return gh( + "release", + "list", + "--repo", + os.environ["GITHUB_REPOSITORY"], + "-L", + "1", + "--json", + "tagName", + "-q", + ".[0].tagName", + ) def merged_prs() -> list[dict]: @@ -25,6 +36,8 @@ def merged_prs() -> list[dict]: prs = gh( "pr", "list", + "--repo", + repo, "--state", "merged", "--base", diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 38ed03c..ae22d4b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -89,7 +89,8 @@ jobs: env: VERSION: ${{ needs.check-version.outputs.version }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} run: | set -euo pipefail notes="$(uv run --script .github/scripts/write_release_notes.py "$VERSION")" - gh release create "$VERSION" --draft --target main --notes "$notes" + gh release create "$VERSION" --repo "$REPO" --draft --target main --notes "$notes"