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

Draft pull requests trigger "Pull request created" #182

Closed
dpraul opened this issue Mar 28, 2019 · 48 comments
Closed

Draft pull requests trigger "Pull request created" #182

dpraul opened this issue Mar 28, 2019 · 48 comments
Labels
stay tuned We have a ticket in our backlog and will update contributor when work commences

Comments

@dpraul
Copy link

dpraul commented Mar 28, 2019

I understand that Draft pull requests are a fairly new feature, so maybe it's just that the workflow hasn't been entirely ironed out with how they work with the Jira integration.

That said, opening the discussion: I'm not sure if a draft pull request makes sense to trigger "Pull request created". Right now we use that trigger to transition issues from "In Progress" to "In Review", and I think the intent of a draft pull request is to signal code is still being developed, thus why it also does not trigger CODEOWNERS. I'm also open to suggestions on how to do the transition better if it sounds like I'm in the wrong ballpark.

Thanks!

@tcbyrd
Copy link
Contributor

tcbyrd commented Mar 28, 2019

Hey @dpraul Thanks for opening this issue! Definitely makes sense to discuss how this should work here. One dependency we have is that the enum for the Pull Request status is this:

https://github.com/integrations/jira/blob/c2b329dd200c3dd348104a16f442602067644fc7/docs/DevInfoAPI.json#L427

It would be great if Jira had a "Draft" state, and maybe we can talk to Atlassian about adding that to their API, but in the mean time, would you rather not have the Pull Request be sent to Jira at all if it's in Draft state? I feel like this could be something people have different opinions on. Personally I would say that creating a Pull Request doesn't necessarily mean it's in review, and maybe you could update the PR title to include the transition syntax when it's really ready for review?

@dpraul
Copy link
Author

dpraul commented Mar 29, 2019

I agree with your point on people having differing opinions - I'm not certain leaving draft pull requests out of Jira is the best solution.

Definitely also see your point on a PR opened not necessarily meaning it's in review (my workflow configuration skills are weak, so I'm sure there is room for improvement there). Ideally the workflow would be able to pick up when reviewers are added to a PR and use that to fire the transition, but I haven't had a chance yet to figure out if I can do that given the current tooling or whether that's something that would need to be handled by a different plugin. We're avoiding the smart commit syntax right now in favor of things that work directly with the interface, but that's apt to change if the tools only go so far.

Regardless, if the takeaway here is that draft pull requests function as expected given the current Jira API restrictions then I think that's fine. It was confusing when I originally saw it, but I see how that could also be a result of our non-ideal workflow.

@danielfx90
Copy link

@tcbyrd what would happen if the status is set to UNKNOWN? Will it prevent the issue from transitioning but at the same time add it to the issue?

Have there been any improvements in JIRA's API to tackle this issue better now?

@ivan-californias
Copy link

Hi, any update on this issue?

Following up on the conversation, I rather not have the Pull Request be sent to Jira while it is a draft until it becomes ready for review.

@joseluiscadena
Copy link

agree with last comment, is there any update?

@samaronybarros
Copy link

Hi, any updates on this issue?

I also agree with @ivan-californias.

@RiaanVR
Copy link

RiaanVR commented Oct 7, 2020

Any further feedback on this issue @tcbyrd? I stumbled upon this today and have the same workflow as described by the original author, and am fully on board with the solution proposed by @ivan-californias, what is required to move this forward?

@patrick-tresp
Copy link

Hi there,
we also would like to have drafts not to be sent to jira since this is misleading our tracking.
A Draft is sometimes kept for multiple days or even weeks and it keeps sticking to a state that implies an active PR.

Looking forward to it!

@EVNoInc
Copy link

EVNoInc commented Oct 30, 2020

Another bump here. Being able to differentiate between draft and final PRs would be awesome for our workflows.

@sidhuko
Copy link

sidhuko commented Nov 20, 2020

This feature should be configurable by the user. I dislike drafts triggering code review. It breaks peers reviewing each others work.

@tubbo
Copy link

tubbo commented Dec 15, 2020

here to chime in and say that i also ran into this issue and it would be amazing if we could get either a different trigger for PRs or possibly a condition where we can check the PR's type

@matthias-mohemian
Copy link

Any updates here? Would really improve our Jira - Guthub workflow!

@antoine-roam
Copy link

Another bump here, any update @tcbyrd ?
Any chance this could be reviewed by the Jira team anytime soon?
Cheers.

@trm42
Copy link

trm42 commented Feb 25, 2021

It seems that Atlassian has their own ticket about this one. Probably helps more if people go there to vote the issue:

https://jira.atlassian.com/browse/JRACLOUD-72888

@rachellerathbone rachellerathbone added the to triage Decisions need to be made before implementing label May 17, 2021
@rachellerathbone
Copy link
Contributor

Hi @dpraul. I'm from a team at Atlassian that is currently in the process of migrating the ownership over to us from GitHub. As a part of this, we're currently going through the backlog of issues and prs to see what can still be addressed and what should be closed.

I've flagged this with the 'to-triage' label so my team can discuss. We'll keep you posted on the status of this.

@smckinney1
Copy link

I would also love to see Draft PRs treated differently for the JIRA integration!

@brentjensen
Copy link

I would also like to have this feature. We use it to trigger our workflow to move columns and bring work items to people's attention.

@ViktorOgnev
Copy link

Please add this differentiation – this is important to our organization!

@Reedyuk
Copy link

Reedyuk commented Oct 8, 2021

Same here, currently In-Review column is flooded with draft pr's which are not ready for review.

@hamirmahal
Copy link

@tebriel and @rachellerathbone, I think this is a feature our team could benefit from, as well. What things do you need from the community to add this?

There's an implementation mentioned by a member of the community, at https://jira.atlassian.com/browse/JRACLOUD-72888, that would be nice for Atlassian to support natively, especially for developers who don't have admin-level access to our organization's git repository, the Jira workspace, or either.

@juniorb2ss
Copy link

Any news about it?

@bbredewold
Copy link

Bump!

@lewham
Copy link

lewham commented Jun 2, 2022

Not sure if I should complain to Jira or Github about this, I decided on both. Can we get a solution for this?

@suhaasprasad
Copy link

+1

@tylertrussell
Copy link

+1 from us as well; we'd love for Drafts to not trigger the "Pull Request Created" event

@GalDayan
Copy link

Any news?

@nickpassarella
Copy link

+1

2 similar comments
@matthias-mohemian
Copy link

+1

@verganis
Copy link

+1

@dpraul
Copy link
Author

dpraul commented Sep 30, 2022

To future people popping in here: feel free to comment if you have input! But simply commenting with a "+1" or similar "bump" comments does nothing except create noise for all the subscribers on this thread.

If you'd like to show your support but have nothing to add besides what has already been said, GitHub has a mechanism for your voice to be heard without creating additional noise! Simply leave a 👍 on the top comment and Atlassian will be able to see your input when they sort by "most reactions". 🙂

@rachellerathbone rachellerathbone added stay tuned We have a ticket in our backlog and will update contributor when work commences and removed to triage Decisions need to be made before implementing labels Oct 19, 2022
@rafcevallos
Copy link

I agree the draft pr should NOT trigger a jira change. For example, we have a "Code Review" status for tickets and ideally this would only happen for real PRs and not draft ones.

I sometimes set up a draft pr when I'm doing file setup for new work and then PMs get excited because it seems the work was done so fast 🤣 .

@kwdowik
Copy link

kwdowik commented Oct 28, 2022

+1

@mjonas87
Copy link

mjonas87 commented Nov 9, 2022

FYI - looks like some hero has opened a PR regarding this. Let's give it some love ya'll
#1556

@giulitn
Copy link

giulitn commented Nov 10, 2022

+1

1 similar comment
@anastasiyamazheika
Copy link

+1

@kb-ist
Copy link

kb-ist commented Jan 20, 2023

Another vote here for draft PRs not triggering transitions in Jira, it causes a lot of confusion.

@DanielKrofchick
Copy link

@rachellerathbone we're coming up on 4 years since GitHub introduced the draft feature (Feb 14). This thread is about the same age with no progress at all on the issue, or any communication about what Atlassian plans to do. Can you please give us some insight into this problem and what Atlassian's intentions and timeline are for fixing this. Unfortunately I'm not able to comment in the Atlassian ticket posted earlier here, so this is the only outlet I've found.

@haydenmatthews
Copy link

Still no update on this? Unable to comment as others have stated on the Atlassian thread.

@atrigueiro
Copy link
Contributor

Hi all, we know you’ve been patiently waiting for this feature. We’re pleased to let you know it’s now in final testing stages and should be available soon. We’ll keep you posted on this issue and you can also follow the updates on this PR, stay tuned.

@atrigueiro
Copy link
Contributor

I’m happy to announce this feature is now available for everyone! New draft PRs will now be highlighted as DRAFT in your Jira issues. Thanks so much for your patience and let us know what you think of the change.

Screenshot 2023-10-03 at 2 06 40 pm

@usmonster
Copy link

Thank you for the announcement @atrigueiro! I'm however not sure the new feature fulfills this issue's core request (i.e. opening draft PR shouldn't trigger "Pull request created" action). If this is the case, can you please reopen it? Thanks!

@kb-ist
Copy link

kb-ist commented Oct 3, 2023

Thanks @atrigueiro! Progress on this issue finally is much appreciated but I agree with @usmonster, this is only half the solution, since the "Pull request created" trigger is currently unaffected by this change. so I wouldn't consider this issue resolved.

@hyei
Copy link

hyei commented Oct 4, 2023

We can now check pullRequest.state for "draft" to avoid transitioning for those who are not following JIRACLOUD-78888, but the transiton from draft to ready for review PR should probably trigger "Pull request created", if there is NO other way to detect this transition.

@hipages-songyixing
Copy link

just had a check, the transition from draft to ready won't trigger Pull request created again.

@GoncaloBastos
Copy link

This issue is not resolved!

@tilmanul
Copy link

It would be great to get it a) solved in general and b) also for Data Center solved.

@lkraav
Copy link

lkraav commented Mar 19, 2024

Mid-2024: I'm just joining this dance half-baked "PR created" workflow dance. It's possible we have to create a new issue, because re-opening closed issues (even if it's arguably incorrectly closed) has its own various workflow gremlins associated.

Maybe @atrigueiro or @rachellerathbone can lead the way to the new GH issue on how to get Draft -> Ready transition working correctly?

Just re-triggering "Pull request created" could be a sane option looking at it from surface level, but side-effects?

Without PR workflows right to a tee, tool-hopping is back on the table for many, I'm sure.

@theklr
Copy link

theklr commented Jun 12, 2024

+1 on resolution needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stay tuned We have a ticket in our backlog and will update contributor when work commences
Projects
None yet
Development

No branches or pull requests