A resolving pull request is a pull request that:
Contains an auto-closing keyword to an issue
Has a
stateequal toDRAFT,OPENorMERGED(notCLOSED)Has a
head refthat has not been used as abase refby a previous resolving pull request associated with the issue
This last condition ensures that release PRs (e.g., PR from master to staging then staging to production) do not get considered as resolving if they follow a proper implementation PR (e.g., from my-feature-branch to master), even though they contain references to issues through commits.
Example: Series of PRs related to an issue via an auto-closing keyword, and whether they are considered "resolving" by Keypup.
PR | From (head) | To (base) | State | Resolving? |
PR 1 | main | hotfix | MERGED | β |
PR 2 | feat1 | main | MERGED | β The main branch was used as a "from" but not as a "to" yet, so it is fine. |
PR 3 | feat2 | main | MERGED | β |
PR 4 | feat3 | staging1 | CLOSED | π« The PR is closed |
PR 5 | staging1 | staging2 | DRAFT | β The staging1 branch was used as a "to" by PR 4, but PR 4 is closed, so it is ignored. |
PR 6 | main | prod | OPEN | π« The main branch has been used as a "to" by PR 3. |
This condition replaces the rule from GitHub, GitLab, Bitbucket and Azure DevOps that resolving pull requests must target the main branch. This condition is not practical for Keypup since the main branch can change over time. Using this definition would mean that any resolving PR preceding a change of main branch would no longer be considered as resolving, which would impact historical reporting.
The Keypup definition also brings some flexibility in case of emergency releases. If you push an emergency fix referencing an issue to the main branch and then release this fix through release PRs, then the first release PR will be considered as a resolving PR (GitHub/GitLab/Bitbucket/ADO would simply ignore it). This information can then be used for incident reporting in Keypup.
