From 01d9280453891d9c62cb85ca1318690c1ba73c56 Mon Sep 17 00:00:00 2001 From: j7an Date: Wed, 27 May 2026 22:16:04 -0700 Subject: [PATCH] fix(safety): make dependency-safety/gate status clickable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gate row in PR check rollups was rendered with empty target_url because the legacy Statuses API calls didn't set one. Users had to manually locate the Dependency Safety workflow run under the Actions tab to inspect a failed or stuck-pending gate. Add target_url pointing at the current workflow run to all three gh api .../statuses/... calls (non-bot success, Dependabot pending, and final state). In workflow_call context, github.server_url / .repository / .run_id resolve to the caller's run — which is where the safety/scan logs live. No script changes; no inline-sync impact. --- .github/workflows/dependency-safety.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependency-safety.yml b/.github/workflows/dependency-safety.yml index 0cd4c5f..e3986f3 100644 --- a/.github/workflows/dependency-safety.yml +++ b/.github/workflows/dependency-safety.yml @@ -47,13 +47,15 @@ jobs: gh api "repos/${GH_REPO}/statuses/${HEAD_SHA}" \ -f state="success" \ -f context="dependency-safety / gate" \ - -f description="Non-bot PR — no cool-down required" + -f description="Non-bot PR — no cool-down required" \ + -f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" echo "skip=true" >> "$GITHUB_OUTPUT" else gh api "repos/${GH_REPO}/statuses/${HEAD_SHA}" \ -f state="pending" \ -f context="dependency-safety / gate" \ - -f description="Scanning dependencies for known exploits..." + -f description="Scanning dependencies for known exploits..." \ + -f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" echo "skip=false" >> "$GITHUB_OUTPUT" fi @@ -1889,4 +1891,5 @@ jobs: gh api "repos/${GH_REPO}/statuses/${HEAD_SHA}" \ -f state="$GATE_STATE" \ -f context="dependency-safety / gate" \ - -f description="$STATUS_DESC" + -f description="$STATUS_DESC" \ + -f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"