From 4e4e39d93210aa7bcd0b5c9684a33574c64405e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 10 Nov 2026 18:13:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20stale=20author=20associati?= =?UTF-8?q?on=20in=20dependency=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/guard-dependencies.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/guard-dependencies.yml b/.github/workflows/guard-dependencies.yml index 11bbf09b..a6c74de1 100644 --- a/.github/workflows/guard-dependencies.yml +++ b/.github/workflows/guard-dependencies.yml @@ -1,7 +1,7 @@ name: Guard Dependencies on: - pull_request_target: # zizmor: ignore[dangerous-triggers] -- This workflow only reads context.payload metadata, never checks out PR code + pull_request_target: # zizmor: ignore[dangerous-triggers] -- This workflow only reads PR metadata, never checks out PR code branches: [main] paths: - pyproject.toml @@ -20,7 +20,12 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | - const pr = context.payload.pull_request; + // The event's author association can be stale. + const { data: pr } = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); const author = pr.user.login; const assoc = pr.author_association;