Skip to content

ci: Skip duplicate high-risk code PR comments - #6010

Merged
romtsn merged 6 commits into
mainfrom
ci/skip-duplicate-high-risk-comments
Nov 6, 2026
Merged

romtsn merged 6 commits into
mainfrom
ci/skip-duplicate-high-risk-comments

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

📜 Description

Update the high-risk code workflow so it lists existing PR comments and only posts the warning if one is not already present. Matches the behavior in sentry-dart.

💡 Motivation and Context

On every push to a PR that touches high-risk files, the workflow created another identical comment. That spam is noisy for reviewers. Skip when a comment with the high-risk marker already exists.

💚 How did you test it?

  • Compared against the sentry-dart workflow implementation
  • YAML-only CI change; no runtime/SDK tests

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

#skip-changelog

Requested by Gino Buenaflor.

--

View Junior Session [Sentry]

@buenaflor
buenaflor marked this pull request as ready for review August 26, 2026 15:39
Copilot AI lite review requested due to automatic review settings August 26, 2026 15:39

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8af0c7b. Configure here.

@sentry

sentry Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@markushi markushi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

sentry-junior Bot and others added 6 commits November 6, 2026 12:48
Only post the high-risk code warning once per PR, matching sentry-dart.

Co-Authored-By: Gino Buenaflor <giancarlo.buenaflor@sentry.io>
Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
Avoid missing an existing warning when a PR has more than 30 comments.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
Avoid TypeError if a PR comment has a null body.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
Keep a single warning comment and refresh its body so reviewers
do not see a stale high-risk file list after later pushes.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
Only rewrite the warning when the high-risk file set changes, and keep
reviewer checkbox state for files that remain.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
Drop the leading space before the file list and allow optional
indent so the first checklist item is not skipped on parse.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
@sentry-junior
sentry-junior Bot force-pushed the ci/skip-duplicate-high-risk-comments branch from 61ef7a0 to 3e15390 Compare November 6, 2026 12:48
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 6, 2026 12:48
@romtsn
romtsn merged commit 7c0be47 into main Nov 6, 2026
43 of 44 checks passed
@romtsn
romtsn deleted the ci/skip-duplicate-high-risk-comments branch November 6, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants