eslint-github-bot icon indicating copy to clipboard operation
eslint-github-bot copied to clipboard

Comment on an issue when a PR is created to fix it

Open not-an-aardvark opened this issue 7 years ago • 8 comments
trafficstars

As suggested here, this would allow people who follow the issue to also keep up with discussion that moves to a PR. This would probably work by having the bot listen for PRs that are created/edited to have an issue number in the title, and leave a comment on the corresponding issue.

We might also want to have some safeguard for preventing abuse if someone creates a PR with a title like #1 #2 #3 #4 #5 #6 #7 ... with the intent of having the bot create a bunch of spam comments.

not-an-aardvark avatar Jul 27 '18 01:07 not-an-aardvark

Also, the bot need not create a comment unless it's never been directly referenced before - once it's been referenced, I think it's safe to assume that interested parties can find it and subscribe to it.

ljharb avatar Jul 27 '18 05:07 ljharb

The bot doesn't have a database, so remembering that type of thing might be tricky. I suppose it could search through its old comments on any given issue.

I assume we would want the bot to leave multiple comments on an issue if there are multiple PRs opened for it, right? Sometimes a PR gets initially created and then abandoned later.

not-an-aardvark avatar Jul 27 '18 05:07 not-an-aardvark

Yes - the goal is to ensure that by subscribing to the issue, I won't miss any relevant pull requests that might show up later.

ljharb avatar Jul 27 '18 05:07 ljharb

Worth noting that if the original issue number is referenced in the PR description GitHub will automatically create a crosslink in the issue thread. I’m not sure if that generates an email notification, though.

On a side note I’ve found GitHub subscriptions to be unreliable - sometimes it just fails to send out a notification altogether, even for issues I’ve manually subscribed to.

fatcerberus avatar Jul 27 '18 14:07 fatcerberus

It does not generate a notification.

I’ve never seen Github fail to notify (note that i don’t care about emails, i care about it appearing in my notifications list on the website)

ljharb avatar Jul 27 '18 17:07 ljharb

GitHub issues currently show "May be fixed by #nnnn" when there is at least one PR with "fixes"/"closes" in its commit message.

Additionally, this has been open for over a year with no movement.

Are there any objections if I close this soon? Is this requested feature still needed?

platinumazure avatar Oct 25 '19 20:10 platinumazure

Yes, it’s still needed - the new metadata still does not generate a notification.

ljharb avatar Oct 25 '19 20:10 ljharb

PR would be welcome in that case.

platinumazure avatar Oct 25 '19 20:10 platinumazure