Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Integration installation failed when name contains ' (single quote) #69837

Open
aldy505 opened this issue Apr 27, 2024 · 7 comments · May be fixed by getsentry/develop#1268
Open

GitHub Integration installation failed when name contains ' (single quote) #69837

aldy505 opened this issue Apr 27, 2024 · 7 comments · May be fixed by getsentry/develop#1268

Comments

@aldy505
Copy link

aldy505 commented Apr 27, 2024

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce

Create a GitHub App named Something's New, then install it.

Expected Result

Installation successful, we're redirected to https://github.com/apps/something-s-new

Actual Result

Instead, we're redirected into https://github.com/apps/somethings-new

The app in question: https://github.com/apps/teknologi-umum-s-sentry

Product Area

Settings - Integrations

Link

No response

DSN

No response

Version

24.4.1

@getsantry
Copy link
Contributor

getsantry bot commented Apr 27, 2024

Assigning to @getsentry/support for routing ⏲️

@aldy505
Copy link
Author

aldy505 commented Apr 27, 2024

The code for the URL slug creation is here:

name = options.get("github-app.name")
return f"https://github.com/apps/{slugify(name)}"

I suppose we have 2 options moving forward:

  • Let the users provide their own github app url
  • Repair the slugify() function to generate correct url

@getsantry
Copy link
Contributor

getsantry bot commented Apr 29, 2024

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️

@scefali
Copy link
Member

scefali commented May 1, 2024

@aldy505 I guess you're saying Github uses a slightly different slugify implementation than us. We use the built in Django one but we could potentially add a wrapper around it for Github for this special case. That being said, it seems like there is a workaround of just renaming the app to get rid of the ' in the name, no?

@aldy505
Copy link
Author

aldy505 commented May 2, 2024

@aldy505 I guess you're saying Github uses a slightly different slugify implementation than us. We use the built in Django one but we could potentially add a wrapper around it for Github for this special case.

Yes.

That being said, it seems like there is a workaround of just renaming the app to get rid of the ' in the name, no?

No, I don't think that's a viable solution for everyone. Perhaps the easiest solution would be specifying our own Github App URL. If the Github App URL doesn't exists, we'll use the slugify function.

@scefali
Copy link
Member

scefali commented May 3, 2024

@aldy505 what if you changed the name in your github-app.name option to the actual slug you expect? I am pretty sure that would work.

@aldy505
Copy link
Author

aldy505 commented May 5, 2024

Maybe that will work, since only found 3 occurrences of github-app.name on the repo. We still need to add this to the docs though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants