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

Use CI_API_V4_URL in GitLab if it is available #968

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

beezly
Copy link
Contributor

@beezly beezly commented Dec 16, 2019

I'm sure there is lots of room for improvement in this change! Please suggest whatever you think is appropriate. I'm particularly feeling some hnng around the way I'm testing this change.

Basically, since GitLab 11.7 an environment variable called CI_API_V4_URL has been available (per https://docs.gitlab.com/ce/ci/variables/predefined_variables.html) which contains the information that we currently supply as DANGER_GITLAB_HOST.

I've left DANGER_GITLAB_HOST dominant because some people may have unusual configs where they have done things with hostnames that we don't expect and changing the behaviour may break things for them, but for new users it should now be possible to configure the CI side of Danger by just supplying a token.

@orta
Copy link
Member

orta commented Dec 16, 2019

Yes! Perfect, this is great 👍

@orta orta merged commit dab0e63 into danger:master Dec 16, 2019
@beezly beezly deleted the use_gitlab_api_env branch December 16, 2019 13:44
@peril-staging
Copy link
Contributor

peril-staging bot commented Jan 5, 2020

Thanks for the PR @beezly.

This PR has been shipped in v9.2.10 - CHANGELOG.

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.

None yet

2 participants