plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

PublicBot error

Open SidharthBansal opened this issue 8 years ago • 4 comments

Please describe the problem (or idea)

I was doing a pull request at plots. I wrote "Fixes #issue_number" but still it is showing me "You must enter like "fixes ..." image See the first and the last line of the image

SidharthBansal avatar Jan 24 '18 01:01 SidharthBansal

I've noticed that too. It does not always happen though. See PR #2078, which is not linked to any open issue. Have you looked at Dangerfile in the root folder?

seafr avatar Jan 24 '18 13:01 seafr

Thanks @seafr It helped a lot in solving the issue.

I found that the dangerfile says that if any commit has message containing #some_number than that will create no message. But if the person has written the issue number in the pr_body then that does not work. So, @jwarren shall I change https://github.com/publiclab/plots2/blob/6051774af117bd32c2af944a23df097d0b2ebaf5/Dangerfile#L5-L7 to

unless git.commits.any? { |c| c.message =~ /#[\d]+/ } || github.pr_body.any?{ |c| c.message =~ /#[\d]+/ }
  message "This pull request doesn't link to a issue number. Please refer to the issue it fixes (if any) in the body of your PR, in the format: `Fixes #123`."

SidharthBansal avatar Jan 25 '18 15:01 SidharthBansal

Awesome! Great catch.

On Jan 25, 2018 10:21 AM, "Sidharth Bansal" [email protected] wrote:

Thanks @seafr https://github.com/seafr It helped a lot in solving the issue.

I found that the dangerfile says that if any commit has message containing #some_number than that will create no message. But if the person has written the issue number in the pr_body then that does not work. So, @jwarren https://github.com/jwarren shall I change https://github.com/publiclab/plots2/blob/6051774af117bd32c2af944a23df09 7d0b2ebaf5/Dangerfile#L5-L7 to

unless git.commits.any? { |c| c.message =~ /#[\d]+/ } || github.pr_body.any?{ |c| c.message =~ /#[\d]+/ } message "This pull request doesn't link to a issue number. Please refer to the issue it fixes (if any) in the body of your PR, in the format: Fixes #123."

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/2086#issuecomment-360497849, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJzTW7FKZWQ3EkcraqeZ3ZsibKClxks5tOJvAgaJpZM4Rqkil .

jywarren avatar Jan 25 '18 15:01 jywarren

You're welcome @SidharthBansal

seafr avatar Jan 26 '18 13:01 seafr