Only add the "Autolander could not find a bug number" comment once per pull request

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: emorley, Assigned: emorley)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

It would be great if autolander would only post this message once per pull request:

"""
Autolander could not find a bug number in your pull request title. All pull requests should be in the format of: Bug [number] - [description].
"""

Otherwise the PR ends up being spammed, eg:
https://github.com/mozilla/treeherder/pull/1223

:-)
For clarity, there were actually commits committed and pushed between each of those autolander messages, but I then squashed them all in a rebase so they disappeared.
Assignee: nobody → emorley
Created attachment 8756415 [details] [review]
[autolander] edmorley:only-warn-bug-number-once > mozilla:master
Comment on attachment 8756415 [details] [review]
[autolander] edmorley:only-warn-bug-number-once > mozilla:master

Last one :-)
Attachment #8756415 - Flags: review?(kevin+bugzilla)
Is there a "rename" action or similar? I've seen cases where people will mis-format or forget the bug name, and they need to edit the pull request title to link it to the bug. I guess they could still close/reopen the PR though?
Flags: needinfo?(emorley)
Comment on attachment 8756415 [details] [review]
[autolander] edmorley:only-warn-bug-number-once > mozilla:master

Seems fine, though it would be nice if there was some way that people can edit the PR title to get things landed.
Attachment #8756415 - Flags: review?(kevin+bugzilla) → review+
Changing the PR title will trigger the "edited" event, which will still cause the PR to be attached if it wasn't already.

The only difference this PR makes, is that the comment warning them about the lack of bug number is only ever left when the PR is first created.
Flags: needinfo?(emorley)
(In reply to Ed Morley [:emorley] from comment #6)
> Changing the PR title will trigger the "edited" event, which will still
> cause the PR to be attached if it wasn't already.

Since that's performed by the untouched `attachPullRequest()`:
https://github.com/mozilla/autolander/blob/5fbfcc0c9ae247c858df0405e14f0edc42636188/routes/pull_request.js#L59
https://github.com/mozilla/autolander/commit/e8ea76f274f6d5c6dc052c075f5fbdb0a8f67cf8
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.