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
danger pr
treats GitLab URLs as GitHub and fails
#1388
Comments
Pretty sure it only works with github |
Ah, that's a shame. I'm trying to debug why I can't get Danger working with this new repo, and having to make a back-and-forth with CI is really slowing things down 🙁 I'll leave this open until I can have a look to see if I can come up with a PR to add GitLab functionality… |
this isnt as nice as using pr , but you can set the following 3 environment variables in your terminal session before running danger and it works. These are Gitlab Predefined Variables that are set in every gitlab job.
|
In case someone lands here, in addition to @dmlond 's variables, I also had to add export GITLAB_CI=true
export CI_PROJECT_PATH='group/project' # The project namespace with the project name included.
export CI_MERGE_REQUEST_IID=41 # this is the internal id of the merge request in the project
export DANGER_GITLAB_API_TOKEN="xxx"
export CI_API_V4_URL="https://example.gitlab.com/api/v4"
danger |
The @dmlond and @chrisvltn solutions worked for me, but now I'm getting 404 error on Danger request. |
Update: For me, @dmlond and @chrisvltn solutions worked, but I needed to change the
|
Report
What did you do?
What did you expect to happen?
Danger either examines the URL format, or retrieves the URL, and then works out that it should be using the GitLab tokens.
I'm not sure if this is down to Danger failing to detect GitLab when it's an on-prem instance, or
danger pr
only supporting GitHub, though.What happened instead?
Danger just goes ahead and treats it as GitHub, regardless:
Your Environment
The text was updated successfully, but these errors were encountered: