Skip to content

feat: auto-assign SDK team reviewers on skill-drift PRs#92

Merged
HazAT merged 3 commits intomainfrom
feat/skill-drift-pr-creation
Apr 8, 2026
Merged

feat: auto-assign SDK team reviewers on skill-drift PRs#92
HazAT merged 3 commits intomainfrom
feat/skill-drift-pr-creation

Conversation

@HazAT
Copy link
Copy Markdown
Member

@HazAT HazAT commented Apr 8, 2026

Summary

Adds a lightweight workflow that auto-assigns SDK team reviewers when a skill-drift PR is opened — no agent involvement needed.

Problem

PR #84 was opened by the drift workflow but had no team reviewers assigned. The agentic workflow has add_reviewer available but the agent didn't call it. Relying on an LLM to remember a tool call is unreliable.

Solution

A simple pull_request: opened workflow with a hardcoded skill → team mapping:

Skill Team
sentry-android-sdk, sentry-cocoa-sdk team-mobile
sentry-browser-sdk, sentry-node-sdk, sentry-nextjs-sdk, sentry-nestjs-sdk, sentry-react-sdk, sentry-svelte-sdk, sentry-cloudflare-sdk team-javascript-sdks
sentry-dotnet-sdk, sentry-go-sdk, sentry-php-sdk, sentry-ruby-sdk, sentry-elixir-sdk team-web-sdk-backend
sentry-flutter-sdk, sentry-react-native-sdk team-mobile-cross-platform
sentry-python-sdk owners-python-sdk

Triggers only when:

  1. PR touches skills/sentry-*-sdk/** files
  2. PR has the skill-drift label

Also retroactively assigned JS SDK reviewers to PR #84.

HazAT and others added 3 commits March 27, 2026 15:14
Extend the weekly skill-drift-check workflow to directly fix straightforward
drift by opening PRs instead of only creating issues. The agent now:

- Prefers opening PRs for mechanical changes (new config options, version
  bumps, new integration entries) with the fix applied inline
- Falls back to issues for complex/risky drift (breaking API removals,
  ambiguous behavior, coordinated rewrites)
- Uses add_reviewer to assign the appropriate SDK team (from the mapping
  table) as reviewer on each PR
- PRs are opened as ready-for-review (not draft) with auto-labels and
  14-day expiry

Frontmatter changes:
- Added create-pull-request safe output (max 10, non-draft, protected
  supply-chain files fall back to issues)
- Added add-reviewer safe output restricted to the 5 SDK team slugs
- Recompiled lock.yml with gh-aw v0.64.2 (was v0.55.0)

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Add a lightweight workflow that triggers on PR open for skill-drift labeled
PRs. It checks which skills/sentry-*-sdk/ directories were modified and
requests review from the corresponding SDK team via a hardcoded mapping.

This removes the dependency on the agentic workflow remembering to call
add_reviewer — team assignment happens deterministically based on file
paths regardless of how the PR was created.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
The requestReviewers API needs the full org/team-slug format
(e.g., getsentry/team-javascript-sdks) to resolve teams correctly.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@HazAT HazAT merged commit fdb4eeb into main Apr 8, 2026
9 checks passed
@HazAT HazAT deleted the feat/skill-drift-pr-creation branch April 8, 2026 07:22
Copy link
Copy Markdown

@cursor cursor bot left a comment

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 3 potential issues.

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 01ca68b. Configure here.

'sentry-react-sdk': 'getsentry/team-javascript-sdks',
'sentry-ruby-sdk': 'getsentry/team-web-sdk-backend',
'sentry-svelte-sdk': 'getsentry/team-javascript-sdks',
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Team reviewer slugs include invalid org prefix

High Severity

The SKILL_TEAMS mapping values include the getsentry/ organization prefix (e.g., getsentry/team-mobile), but the GitHub REST API's pulls.requestReviewers endpoint expects team_reviewers to be an array of bare team slugs without the org prefix (e.g., team-mobile). Passing org-prefixed values will cause the API call to fail, meaning reviewers will never be assigned — defeating the entire purpose of this workflow.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 01ca68b. Configure here.

pull-requests: write
steps:
- name: Assign SDK team reviewers
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent action version not in lock file

Low Severity

The new workflow pins actions/github-script to SHA 60a0d83039c74a4aee543508d2ffcb1c3799cdea (v7.0.1), while every other workflow in the repository uses v8 (ed597411d8f924073f98dfc5c65a23a2325f34cd). The v7 SHA is also absent from actions-lock.json, breaking the repository's action-pinning convention.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 01ca68b. Configure here.


jobs:
assign-reviewers:
if: contains(github.event.pull_request.labels.*.name, 'skill-drift')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Label check on opened event will never match

High Severity

The workflow only triggers on pull_request: opened, but the job's if condition checks for the skill-drift label. The GitHub REST API for creating pull requests doesn't support a labels parameter — labels are added in a separate API call after creation. The opened webhook event payload reflects PR state at creation time, before labels are attached. This means github.event.pull_request.labels will always be empty, the contains(...) check will always be false, and the job will never run. Adding labeled to the types list would allow the workflow to also trigger when the label is applied.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 01ca68b. Configure here.

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.

1 participant