Skip to content

feat(autofix): Link linear ticket in autofix PR#116510

Merged
Zylphrex merged 4 commits into
masterfrom
txiao/feat/link-linear-ticket-in-autofix-pr
May 29, 2026
Merged

feat(autofix): Link linear ticket in autofix PR#116510
Zylphrex merged 4 commits into
masterfrom
txiao/feat/link-linear-ticket-in-autofix-pr

Conversation

@Zylphrex
Copy link
Copy Markdown
Member

When creating autofix PRs, make sure to link the linear ticket so it'll be closed too.

When creating autofix PRs, make sure to link the linear ticket so it'll be closed too.
@Zylphrex Zylphrex requested a review from a team as a code owner May 29, 2026 18:49
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 29, 2026
Comment thread src/sentry/seer/autofix/autofix_agent.py Outdated
Comment thread src/sentry/seer/autofix/autofix_agent.py

for external_issue in PlatformExternalIssue.objects.filter(group_id=group.id):
if external_issue.service_type == "linear":
is_valid = bool(re.match(r"^[A-Z]{1,10}#\d+$", external_issue.display_name))
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.

why is this needed? how could it be invalid?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Mostly being defensive as I wasn't sure where the display name is computed and this was a cheap check to add.

lines.append(f"Fixes {group.qualified_short_id}")

for external_issue in PlatformExternalIssue.objects.filter(group_id=group.id):
if external_issue.service_type == "linear":
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.

are there other platforms we'd want to do this for? might as well add JIRA, etc too right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I took a look but JIRA is done via another mechanism so I didnt want to bloat this PR with more logic. I can followup later 👍

Copy link
Copy Markdown
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

not sure about that cursor comment

@Zylphrex Zylphrex requested review from a team as code owners May 29, 2026 19:30
Copy link
Copy Markdown
Contributor

@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 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

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 540af71. Configure here.

Comment thread tests/sentry/seer/autofix/test_autofix_agent.py
Comment thread src/sentry/seer/autofix/autofix_agent.py Outdated
@Zylphrex Zylphrex merged commit 154893f into master May 29, 2026
63 checks passed
@Zylphrex Zylphrex deleted the txiao/feat/link-linear-ticket-in-autofix-pr branch May 29, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants