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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Bitrise repo slug lookup #1115

Merged
merged 4 commits into from
Feb 22, 2021

Conversation

rogerluan
Copy link
Contributor

Hey 馃憢

I realized that we had this issue related to Bitrise #1047 and thought it was easy enough to fix. This PR removes GIT_REPOSITORY_URL and uses other env vars that are more user friendly to parse, removing the regex completely - which's also safer and now works for all sorts of URLs.

With my little understanding of how Danger and CI interacts, I hope that simply and blindly dropping the support to GIT_REPOSITORY_URL won't break existing users' setups 馃槵

Resolves #1047
Docs: https://devcenter.bitrise.io/builds/available-environment-variables/

@orta
Copy link
Member

orta commented Feb 18, 2021

I'm not wild on this, because I'm not certain on whether this breaks older installs -

/cc @BanyikAnna - I think bitrise is a pure PAAS, but you do you have enterprise installs etc, or does everyone have the same "version" of bitrise and thus everyone gets the same env vars on builds?

@rogerluan
Copy link
Contributor Author

This might certainly break users who manually override the designed env vars (in this case, GIT_REPOSITORY_URL), but users shouldn't be doing that in the first place I think, so I think it's safe? Both GIT_REPOSITORY_URL and the env vars I used are global bitrise env vars so they should be the same for everyone, independent of version - unlike step-specific env vars that can be modified depending on the version of the step you're using.

I'm not sure about Bitrise Enterprise plans though, they might have a different setup. Thanks for tagging someone with knowledge on this @orta ! 馃

@orta
Copy link
Member

orta commented Feb 18, 2021

I'll give them a few days to respond, if we get nothing by next week I'll take it and treat it as a server minor

@rogerluan
Copy link
Contributor Author

Sounds perfect! Thank you @orta 馃挭

CHANGELOG.md Show resolved Hide resolved
@orta
Copy link
Member

orta commented Feb 22, 2021

OK, let's do it

@orta orta merged commit d351a2a into danger:main Feb 22, 2021
@rogerluan rogerluan deleted the simplify-bitrise-env-vars branch February 22, 2021 13:10
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.

[BUG] Integration with Bitrise BitBucketServer doesn't parse URL correctly when using ssh
2 participants