Enable danger review for forks
What does this MR do?
Due to some limitations Danger bot wasn't enabled repositories which did not set envvar DANGER_GITLAB_API_TOKEN
in the CI pipeline which is true for forks e.g. Community contributions. This envvar is needed so Danger bot can comment its results on the MR.
This MR allows Danger bot to be run on forks so Community contributions get early feedback on e.g. git commit messages.
See !57102 (closed) for a fork MR.
Verification
-
MR from fork - [-] CI should pass/fail depending on the validity of e.g. git commit message
- CI will always pass due to !57097 (comment 541288558)
-
Does not post results to MR
- [-] CI should pass/fail depending on the validity of e.g. git commit message
-
MR on GitLab repository/GitLab member triggers pipeline on MR from fork - same -
CI should pass/fail depending on the validity of e.g. git commit message -
Does post results to MR
-
⚠
Caveat Danger won't fail the CI job even if it on git commit errors. See !57097 (comment 541288558) on the why.
Screenshots (strongly suggested)
Type |
With $DANGER_GITLAB_API_TOKEN (this MR) |
No $DANGER_GITLAB_API_TOKEN (fork MR) |
|
---|---|---|---|
Danger success |
https://gitlab.com/gitlab-org/gitlab/-/jobs/1142903869 ![]() |
https://gitlab.com/rettalps/gitlab/-/jobs/1142906200 ![]() |
https://gitlab.com/gitlab-org/gitlab/-/jobs/1142968956 ![]() |
Comment on MR for |
![]() |
No comment on MR from GitLab |
![]() |
Danger failure |
https://gitlab.com/gitlab-org/gitlab/-/jobs/1142939345 ![]() |
https://gitlab.com/rettalps/gitlab/-/jobs/1143018598 ![]() |
https://gitlab.com/gitlab-org/gitlab/-/jobs/1142983337 ![]() |
Comment on MR for |
![]() |
No comment on MR from GitLab |
![]() |
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?- [-] I have included a changelog entry.
-
I have not included a changelog entry because it's developer-facing.
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Edited by Peter Leitzen