danger-js icon indicating copy to clipboard operation
danger-js copied to clipboard

[BUG] Danger Ignore not working on Gitlab - Tried different formats

Open kadoshms opened this issue 1 year ago • 6 comments

Describe the bug

Iv'e already seen this on https://github.com/danger/danger/issues/650 but since it's an old one, I couldn't find any more references. On an on prem Gitlab instancte, I am trying to ignore a specific fail. Danger message (original message changed):

"This action is forbidden"

Me trying the following variations:

Danger: Ignore "This action is forbidden" > Danger: Ignore "This action is forbidden".

Also tested the Regex from this PR on my ignore message https://github.com/danger/danger/pull/652 in it matched. Is ignoring specific errors possible? The danger docs say it is, although I couldn't find an evidence it actually works.

kadoshms avatar Apr 20 '23 15:04 kadoshms

This feature only exists in the ruby version ( danger/danger) and not in the JS version (which we're on)

orta avatar Apr 20 '23 16:04 orta

Are there any plans to implement this?

kadoshms avatar Apr 20 '23 17:04 kadoshms

Not from me, I'm not really convinced it's a great idea as a PR is very transitory thing

orta avatar Apr 20 '23 17:04 orta

Well I truly believe this is something that is worth considering, even as a configurable item.

kadoshms avatar Apr 21 '23 06:04 kadoshms

I too am worried that Danger Ignore is a misfeature.

Coarse Workaround: you can control if your Dangerfile submits a violation by looking at your PR's labels (from your Dangerfile).

So we have various Feature-flags that control each chunk of custom Dangerfile logic, and you could enable/disable those in bulk via label.

fbartho avatar Apr 21 '23 16:04 fbartho

I indeed ended up creating a mechanism for skipping rules via Labels, works pretty well.

kadoshms avatar Nov 13 '23 07:11 kadoshms