slack icon indicating copy to clipboard operation
slack copied to clipboard

Ability to omit Draft Pull Request

Open justinperkins opened this issue 5 years ago β€’ 62 comments

Now that we can make draft PRs (πŸŽ‰), we've created the desire to keep those draft PRs out of our channels until they've been made official. Thoughts?

justinperkins avatar Feb 20 '19 22:02 justinperkins

@justinperkins This shouldn't be too hard of a pull request to submit. I might give it a shot myself if more folks are interested.

Related to this, I'm working on Draft support in my 3rd-party Slack app and running into some issues due to there not being a webhook event signaling that a pull request is no longer a draft: https://github.com/pullreminders/backlog/issues/124#issuecomment-464276841

abinoda avatar Feb 20 '19 22:02 abinoda

Is this still relevant? If so, just comment with any updates and we'll leave it open. Otherwise, if there is no further activity, it will be closed.

stale[bot] avatar Feb 20 '20 22:02 stale[bot]

Lame Stalebot, this is very much still relevant and a problem. Draft PRs sending PR ready for review announcements is noise and takes away from the "ready for review" state change on the PR.

justinperkins avatar Feb 21 '20 03:02 justinperkins

Is a pull_request of type draft even accessible? I don't see a key for it exposed in the github api PullRequestEvent webhook unless the documentation is outdated.

nitrocode avatar Mar 02 '20 21:03 nitrocode

draft is a boolean state on the pull request object

justinperkins avatar Mar 03 '20 13:03 justinperkins

I'm curious if this is a universal problem. The language of the documentation suggests it only publishes a draft PR if it is marked as "ready for review". This happens to my team, but I think it might be because we have a CODEOWNERS file which automatically sets a required reviewer even on draft PRs.

mbainter avatar Apr 28 '20 00:04 mbainter

I think it’s universal. We don’t have a CODEOWNERS file and drafts still show up in Slack.

justindotpub avatar Apr 28 '20 11:04 justindotpub

The language being referenced is:

pulls - New or merged pull requests, as well as draft pull requests marked "Ready for Review"

New draft pull requests are still new pull requests, and so are covered both by the first half of the sentence (when the PR is first created) and the second half of the sentence (when marked "Ready for Review").

But the language confused me and my organisation the same way it did @mbainter.

gareth avatar Apr 28 '20 15:04 gareth

I am running my tests on github actions but I don't want them to run on draft PR, so I added this to my action types: [review_requested, ready_for_review] but it won't run when the PR is ready and there is someone on the list of requested reviews so not sure if that is a expected behavior and if it has to do with this topic

gugaiz avatar Apr 28 '20 18:04 gugaiz

pulls - New or merged pull requests, as well as draft pull requests marked "Ready for Review"

New draft pull requests are still new pull requests, and so are covered both by the first half of the sentence (when the PR is first created) and the second half of the sentence (when marked "Ready for Review").

I agree with the latter, a Draft PR marked ready for review should trigger a notification (it does), but a new draft PR should at least have a separate subscription channel than new PRs ready for review. As it is, it is noise in the notification channels and leads to confusion and training team members to ignore messages.

justinperkins avatar Apr 28 '20 20:04 justinperkins

Would like to add that this is a universal problem that we are facing too. Getting a "PR opened" notification in Slack for a draft PR is definitely something for which I would like a disable option.

andersarpi avatar May 14 '20 06:05 andersarpi

Would love to see this happen as well πŸ‘

doutatsu avatar May 18 '20 09:05 doutatsu

I'd be happy to take a stab at this. I think it would make sense for Draft PR to be excluded by default from the pulls subscription, and to create another subscription one pulls:draft for drafts? That would be a breaking change btw.

There is already a similar distinction between commits and commits:all.

charlax avatar Jun 02 '20 10:06 charlax

Please, I would love to see this being implemented. The draft mode was designed to reduce noise for code owners, so the slack integration should respect that as well.

sfdye avatar Jun 12 '20 04:06 sfdye

@abinoda FWIW I think the webhook events are available now

image

sfdye avatar Jun 12 '20 04:06 sfdye

Any updates on this?

olafkotur avatar Jul 28 '20 13:07 olafkotur

@sfdye Thanks for the ping. I am not involved with the GitHub Slack integration in any way however.

abinoda avatar Jul 28 '20 19:07 abinoda

+1

joeydong avatar Aug 17 '20 16:08 joeydong

Big +1!

pkiv avatar Aug 25 '20 19:08 pkiv

@ abinoda FWIW I think the webhook events are available now

That link is deprecated.

WebHook events are located here now

JamesGelok avatar Aug 26 '20 19:08 JamesGelok

Any news on this? Still getting spam messages from draft PR's everytime someone opens one

WyriHaximus avatar Sep 16 '20 08:09 WyriHaximus

πŸ’― , this would be great to have.

fred-tyemill avatar Sep 23 '20 18:09 fred-tyemill

+1 Draft PRs are adding too much noise into slack channels.

avcconti avatar Sep 25 '20 09:09 avcconti

+1 Reduce noise πŸ”•

adithshenoy avatar Oct 04 '20 19:10 adithshenoy

+1 this will be a great feature to have to reduce noise

jty-cva avatar Oct 11 '20 23:10 jty-cva

+1

shyamal-anadkat avatar Oct 20 '20 14:10 shyamal-anadkat

+1 for less noise

2121159i avatar Nov 20 '20 08:11 2121159i

+1

tariqporter avatar Dec 22 '20 17:12 tariqporter

I would really appreciate if this could be merged. Displaying status for draft PRs in Slack goes against the spirit of draft PRs IMHO.

ngie-eign avatar Mar 03 '21 00:03 ngie-eign

+1

david-m-globant avatar Apr 27 '21 23:04 david-m-globant