Skip to content

feat(github): Add issue types support for Sentry issues#111501

Open
Asynchronite wants to merge 24 commits intogetsentry:masterfrom
Asynchronite:feat/github-types-addition
Open

feat(github): Add issue types support for Sentry issues#111501
Asynchronite wants to merge 24 commits intogetsentry:masterfrom
Asynchronite:feat/github-types-addition

Conversation

@Asynchronite
Copy link
Copy Markdown

This PR introduces the addition of types to the modal that opens when you try to link a GitHub issue to an external code tracking software.
An example of issue types:
image

Closes #111404.
@cvxluo

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Asynchronite and others added 21 commits March 24, 2026 16:54
…t mock in GitHubIssueBasicTest"

This reverts commit b196a68.
@Asynchronite Asynchronite requested a review from a team as a code owner March 25, 2026 00:34
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 25, 2026
@cvxluo cvxluo added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Mar 25, 2026
@Asynchronite
Copy link
Copy Markdown
Author

Does the team who usually reviews this get automatically notified or..?

@cvxluo cvxluo requested review from a team March 26, 2026 15:49
Copy link
Copy Markdown
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

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

some nits w/ naming but otherwise looks fine -- this needs some frontend work though to actually add it to the modal I think?

Comment thread src/sentry/integrations/github/client.py Outdated
Comment thread src/sentry/integrations/github/issues.py Outdated
Comment thread src/sentry/integrations/github/issues.py Outdated
@bruno-garcia
Copy link
Copy Markdown
Member

this needs some frontend work though to actually add it to the modal I think?

Note: We split FE and BE work in separate PRs

@Asynchronite
Copy link
Copy Markdown
Author

@billyvg @bruno-garcia Implemented both of your changes, thanks for the suggestions (If one of you would be so kind as to re-review and trigger the getsentry tests that would be awesome since the CI is about to remove the label again).

@github-actions github-actions bot removed the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Mar 28, 2026
@Asynchronite
Copy link
Copy Markdown
Author

some nits w/ naming but otherwise looks fine -- this needs some frontend work though to actually add it to the modal I think?

Frontend work is not really my domain, though if you can point me to the repo/code which houses this stuff I can def. look into it!

Comment thread src/sentry/integrations/github/issues.py Outdated
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.

Fix All in Cursor

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

Comment thread src/sentry/integrations/github/issues.py Outdated
@bruno-garcia bruno-garcia added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Mar 28, 2026
@bruno-garcia
Copy link
Copy Markdown
Member

Thank you! Retriggered CI. Team will take a look next week

@aldy505
Copy link
Copy Markdown
Collaborator

aldy505 commented Mar 29, 2026

image

@kenzoengineer @joshuarli @hubertdeng123 from Discord, any clue? I'm just here to forward the message

@Asynchronite
Copy link
Copy Markdown
Author

@bruno-garcia Related to the above, should I look into fixing the codeowners stuff or no?

@kenzoengineer
Copy link
Copy Markdown
Member

i assume the env is SENTRY_EXTERNAL_CONTRIBUTOR? setting this to 1 (or any non-empty string) should work

@Asynchronite
Copy link
Copy Markdown
Author

i assume the env is SENTRY_EXTERNAL_CONTRIBUTOR? setting this to 1 (or any non-empty string) should work

Done that it keeps trying to pull getsentry. I'd like to start clean but I'mma need some help with that.

Copy link
Copy Markdown
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

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

don't worry about the CODEOWNERS job

Comment thread src/sentry/integrations/github/issues.py
Comment on lines +90 to +94
responses.add(
responses.GET,
"https://api.github.com/orgs/getsentry/issue-types",
json=[{"name": "bug"}, {"name": "task"}],
)
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.

there are no assertions that these issue types exist in the config below

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

What do you want me to do here then, I do not think I have access to this info since I am not a member of the org.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@billyvg Just bumping this again!

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.

@Asynchronite the tests below don't check that we have the new issue type field, see lines 99-107. these values should map to https://github.com/getsentry/sentry/pull/111501/changes#diff-ddf35fe3e7025def70c1031006058afeb7f7cb271b82295b5a2729946e8cb329R225-R233

we should also add a test somewhere for the issue type values from the response mock (bug and task)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@Asynchronite the tests below don't check that we have the new issue type field, see lines 99-107. these values should map to #111501 (changes)

we should also add a test somewhere for the issue type values from the response mock (bug and task)

@billyvg I believe fixed in 59d8238.

@kenzoengineer
Copy link
Copy Markdown
Member

kenzoengineer commented Mar 31, 2026

Done that it keeps trying to pull getsentry.

That's very strange, there haven't been any changes to that codepath recently.

What directory are you running the command in? Have you tried both exporting and inlining it?

# 2 liner
export SENTRY_EXTERNAL_CONTRIBUTOR="1"
devenv fetch sentry

# 1 liner
SENTRY_EXTERNAL_CONTRIBUTOR="1" devenv fetch sentry

also maybe try echo $SENTRY_EXTERNAL_CONTRIBUTOR just to make sure? Hard to debug without being there with you but maybe some screenshots would help

@Asynchronite
Copy link
Copy Markdown
Author

@kenzoengineer Hey, I will get back to you when I get a chance, currently away from the computer I used to do this. Sorry for the inconvenience!

@Asynchronite
Copy link
Copy Markdown
Author

# 2 liner
export SENTRY_EXTERNAL_CONTRIBUTOR="1"
devenv fetch sentry

# 1 liner
SENTRY_EXTERNAL_CONTRIBUTOR="1" devenv fetch sentry

Okay, when going through the docs and the instructions inside the CLI, it did not mentiuon that SENTRY_EXTERNAL_CONTRIBUTOR had to be set during the fetch command too. It only mentioned that for the bootstrap command.

After setting it, it worked. Thank you!

@kenzoengineer
Copy link
Copy Markdown
Member

Made the docs more clear so hopefully nobody will be tripped up on the same thing :D getsentry/devenv#228

@github-actions github-actions bot removed the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 18, 2026
@Asynchronite
Copy link
Copy Markdown
Author

If someone would be oh-so-kind as to trigger getsentry tests I would appreciate it!

Comment thread src/sentry/integrations/github/issues.py
@billyvg billyvg added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 20, 2026
@billyvg
Copy link
Copy Markdown
Member

billyvg commented Apr 20, 2026

@Asynchronite ok so the code looks good but as I was testing it locally, I realized we have a problem in that the Sentry GitHub App needs specific permissions to read Issue Types

image

Changing this on our app will send out notifications to all of our customers who have it installed, prompting them to update. Unfortunately, I don't think I can sell our team on doing that for this feature :'(

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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Types" in the issue open modal

6 participants