atlassian / atlassian/github-for-jira
PR status is not propagating correctly with closed draft PRs
- Dominant language
- No language data
- Stars
- 655
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the workflow-transitions section of SUPPORT.md and the Jira development[pullrequests] fields described in the issue. Reproduce the behavior with a draft pull request that is closed by an automation user, then determine whether the open count changes and whether a documented workaround or schema clarification is possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100