Skip to content

The agent that grows with you

fix(ci): let stable admission read the claim draft

ethernet6c1c54c6ce65
diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml
index a9de62f99dd..92844d19496 100644
--- a/.github/workflows/stable-release.yml
+++ b/.github/workflows/stable-release.yml
@@ -23,6 +23,12 @@ concurrency:
jobs:
admit:
+ name: Admit the claim
+ # A read token cannot see a draft release, so gh release view answers
+ # "release not found" for a draft that exists. Write is the permission
+ # that can read it.
+ permissions:
+ contents: write
runs-on: ubuntu-24.04
outputs:
claim-tag: ${{ steps.admit.outputs.claim-tag }}
diff --git a/tests/ci/test_stable_release_graph.py b/tests/ci/test_stable_release_graph.py
index d2a3e94713b..2b6ad0bb4a6 100644
--- a/tests/ci/test_stable_release_graph.py
+++ b/tests/ci/test_stable_release_graph.py
@@ -24,6 +24,11 @@ def ancestors(jobs, name):
return seen
+def test_admit_can_read_the_claim_draft():
+ jobs = workflow("stable-release.yml")["jobs"]
+ assert jobs["admit"]["permissions"]["contents"] == "write"
+
+
def test_release_reuses_whole_ci_and_docker_before_publication():
jobs = workflow("stable-release.yml")["jobs"]
assert jobs["ci"]["uses"] == "./.github/workflows/ci.yaml"