Danger job is bypassed when pipeline is run without a MR
The Danger
job is not triggered when a pipeline is created for a branch before that branch is associated with a MR. This will allow a pipeline to pass when it would have otherwise failed, merely because of the order of events.
If I create a MR, push a commit to the branch which violates Danger rules, and wait for the pipeline to finish, it will fail.
If I create a branch with a commit which violates Danger rules, then push it, and then create a MR for this branch, the pipeline will pass
We ought to trigger pipeline creation when a MR is created, not when an unattached commit is pushed. We currently do this on the GitLab repo where an auto-generated merge-commit is used to trigger a pipeline upon creation of a MR.
Edited by Mike Greiling