danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.24k stars 367 forks source link

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

Open kadoshms opened 1 year ago

kadoshms commented 1 year ago

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.

orta commented 1 year ago

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

kadoshms commented 1 year ago

Are there any plans to implement this?

orta commented 1 year ago

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

kadoshms commented 1 year ago

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

fbartho commented 1 year ago

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.

kadoshms commented 9 months ago

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