question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PR status is not propagating correctly with closed draft PRs

See original GitHub issue

We use a 3rd party merge queueing system that will create a draft PR (which is never upgraded into an open PR) that batches multiple change sets together for CI evaluation. This draft PR contains the commit with the Issue-ID prefix and is linked to the PR. The PR creation and merge commit actions are performed via an internal automation user and when that users closes the PR the state doesn’t transition from Open in Jira to Closed or Declined. The PR never enters the “open” PR state.

Am I correct in assuming that if a PR is closed it would show up as Declined in Jira?

This is blocking automation around closing issues as the development[pullrequests].open = 0 evaluates to false.

  1. Is this a bug that draft PR state doesn’t propagate correctly into Jira?

  2. Is this a case of https://github.com/atlassian/github-for-jira/blob/main/SUPPORT.md#workflow-transitions-are-not-running. I briefly looked into this but the patch files for the merge commits are on behalf of the user (who has Jira permissions) and not the automation user. Pr creation is done by the automation user though. It would be strange to me that the creation event would get picked up but then the transition from Open to Declined.. I tested this theory and disproved it.

  3. Is there a way to bypass this bug and target my automation around a single closed Pull Request? development[pullrequests].merged = 1 (this is invalid jql)… I am having trouble finding documentation around the schema for this field.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
michaellarocca90commented, Aug 2, 2022

@mboudreau do you need something else from me or can we remove the “awaiting-response” and “question” label?

1reaction
rachellerathbonecommented, Oct 19, 2022

Hey all. We had someone on our team do some investigatory work on this one. Unfortunately, it looks like it would require changes in several locations (so not solely the GitHub for Jira integration) so this would need to be picked up by an Atlassian employee. I have created a ticket in our backlog.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing draft pull requests - The GitHub Blog
Merging is blocked in draft pull requests. Change the status to “Ready for review” near the bottom of your pull request to remove...
Read more >
Pull Request Guidelines Checklist - Sourcegraph handbook
This page is to serve as a guideline checklist early career engineers or outside contributors can refer to when creating their first couple...
Read more >
How to build only approved pull requests using the multi ...
I filter the approved pull requests after they are scanned, however the repository scanner can only tell whether a pull request has new...
Read more >
Draft RFC: Support building batches in parallel - #5 by JensRantil ...
As we've grown, we are experiencing growing pains when a lot of developers try to merge code at the same time. We often...
Read more >
PyTorch Contribution Guide
Contribution Process · If you are not ready for the pull request to be reviewed, create a draft pull request first - you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found