From 9dcd39a0445c9b9398584b92b4b606f1ebbaffba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Aug 2026 04:07:58 +0000 Subject: [PATCH 1/4] Initial plan From 99f5f0c9e22f6db3f4f3bd336082c9b3eea5bd2c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Aug 2026 04:13:50 +0000 Subject: [PATCH 2/4] Handle Sentry API auth/permission errors gracefully in sync script Co-authored-by: LightSage <46062298+LightSage@users.noreply.github.com> --- .github/scripts/sentry_to_github_issues.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/scripts/sentry_to_github_issues.py b/.github/scripts/sentry_to_github_issues.py index 4041c1f0..383669b4 100644 --- a/.github/scripts/sentry_to_github_issues.py +++ b/.github/scripts/sentry_to_github_issues.py @@ -91,7 +91,20 @@ def create_github_issue(sentry_issue: dict) -> None: def main() -> int: - issues = get_new_sentry_issues() + try: + issues = get_new_sentry_issues() + except requests.exceptions.HTTPError as exc: + status = exc.response.status_code if exc.response is not None else None + if status in (401, 403): + print( + f"::warning::Sentry API request failed with HTTP {status}. " + "This usually means SENTRY_AUTH_TOKEN is missing the 'event:read' " + "and/or 'project:read' scopes required to list issues. " + "Skipping this run without creating GitHub issues." + ) + return 0 + raise + print(f"Found {len(issues)} unresolved Sentry issue(s) in the last {STATS_PERIOD}.") for issue in issues: From 1e5f7f0b45f7efb1938967c58b3a9f39edb3b642 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:30:57 +0000 Subject: [PATCH 3/4] Address review: emoji warning, re-raise on Sentry auth errors Co-authored-by: LightSage <46062298+LightSage@users.noreply.github.com> --- .github/scripts/sentry_to_github_issues.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/scripts/sentry_to_github_issues.py b/.github/scripts/sentry_to_github_issues.py index 383669b4..c89776f3 100644 --- a/.github/scripts/sentry_to_github_issues.py +++ b/.github/scripts/sentry_to_github_issues.py @@ -97,12 +97,10 @@ def main() -> int: status = exc.response.status_code if exc.response is not None else None if status in (401, 403): print( - f"::warning::Sentry API request failed with HTTP {status}. " + f"⚠️ Sentry API request failed with HTTP {status}. " "This usually means SENTRY_AUTH_TOKEN is missing the 'event:read' " - "and/or 'project:read' scopes required to list issues. " - "Skipping this run without creating GitHub issues." + "and/or 'project:read' scopes required to list issues." ) - return 0 raise print(f"Found {len(issues)} unresolved Sentry issue(s) in the last {STATS_PERIOD}.") From cb622f4a5d3e531e3e26dcffc3235cb42185d84c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:44:59 +0000 Subject: [PATCH 4/4] Revert warning message to use ::warning:: annotation instead of emoji Co-authored-by: LightSage <46062298+LightSage@users.noreply.github.com> --- .github/scripts/sentry_to_github_issues.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/sentry_to_github_issues.py b/.github/scripts/sentry_to_github_issues.py index c89776f3..99cf5398 100644 --- a/.github/scripts/sentry_to_github_issues.py +++ b/.github/scripts/sentry_to_github_issues.py @@ -97,7 +97,7 @@ def main() -> int: status = exc.response.status_code if exc.response is not None else None if status in (401, 403): print( - f"⚠️ Sentry API request failed with HTTP {status}. " + f"::warning::Sentry API request failed with HTTP {status}. " "This usually means SENTRY_AUTH_TOKEN is missing the 'event:read' " "and/or 'project:read' scopes required to list issues." )