From fd7204017594bbfa89d85bf5e0b7bc048abecebc Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Fri, 6 Feb 2026 18:16:04 +0000 Subject: [PATCH] fix(action): Handle permission errors when updating publish issues The GitHub App token may not have permission to update issues in the publish repo (getsentry/publish). Handle this gracefully by catching the error and continuing with the existing issue URL instead of failing the entire release workflow. --- action.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 72ef1070..fe8fa6dc 100644 --- a/action.yml +++ b/action.yml @@ -282,9 +282,13 @@ runs: ${CHANGELOG_SECTION}" if [[ -n "$existing_issue_number" ]]; then - # Update existing issue with fresh body (preserving checked target states) - gh issue edit "$existing_issue_number" -R "$PUBLISH_REPO" --body "$body" - echo "::notice::Updated existing publish request: ${existing_issue_url}" + # Try to update existing issue with fresh body (preserving checked target states) + # This may fail if the token doesn't have permission to update issues in the publish repo + if gh issue edit "$existing_issue_number" -R "$PUBLISH_REPO" --body "$body" 2>/dev/null; then + echo "::notice::Updated existing publish request: ${existing_issue_url}" + else + echo "::warning::Could not update existing issue (permission denied). Using existing issue as-is." + fi echo "issue_url=${existing_issue_url}" >> "$GITHUB_OUTPUT" else # Create new issue