Skip to content
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

Gitlab - Danger is not crossing out outdated comments #1320

Open
Martoon-00 opened this issue Sep 5, 2021 · 0 comments
Open

Gitlab - Danger is not crossing out outdated comments #1320

Martoon-00 opened this issue Sep 5, 2021 · 0 comments

Comments

@Martoon-00
Copy link

Martoon-00 commented Sep 5, 2021

Report

What did you do?

  1. I created MR, Dangerbot posted a warning with a sticky flag according to my rule.
  2. I fixed the problem.

What did you expect to happen?

The warning should be crossed out.

What happened instead?

The message with warning remained not updated, however the CI job with the Danger check passed.

Reproduction notes

I can reproduce this only if the warning was posted with a sticky flag, and it was the only warning remaining.
If there are other unfixed warnings, the outdated warning is crossed out.

Your Environment

  • I use Gitlab CI

  • My Dangerfile

    class Git::Object::Commit
      def subject
        self.message.lines.first.rstrip
      end
    
      def fixup?
        return /\bfixup!|\bsquash!/.match?(subject)
      end
    
    end
    
    
    if git.commits.any? &:fixup?
      fail("Some fixup commits are still there.", sticky: true)
    end

Insights

I guess the problem happens because the case I described is simply not handled. edit_merge_request_note should also be called when there were old violations but no new violations.

AFAIS the same problem is present in GitHub plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants