All Collections
Data & operations
Issues & Pull Requests dataset
Issues and PRs > Smart field: Recommended action
Issues and PRs > Smart field: Recommended action
Tom Azernour avatar
Written by Tom Azernour
Updated over a week ago

The recommended action field is a part of the Issues & Pull Requests dataset.

E.g. when a pull request is still missing reviews, Keypup will recommend reviewing that pull request. However if the build is failing, it will recommend fixing the build first.

It provides an estimated course of action for each issue and pull request based on their context.

The recommended action logic is different for issues and pull requests. See below the detailed logic for each sub-entity of the Issues & Pull Requests dataset.

Recommended Actions On Pull Requests

The recommended action field is based on an industry standard stipulating that pull request should broadly follow the lifecycle below:

  1. A pull request gets opened and is actively worked on.

  2. If left untouched for a few days and with no reviewers, it is likely that the author forgot to assign reviewers. Reviewers must therefore be assigned or active work must be resumed.

  3. Before review, the pull request must be up to date with the base branch (no conflicts) and must have a green build - so reviewers review the final version of the pull request.

  4. To be approved, a pull request must receive a minimum number of approvals. This minimum number of required approval(s) is set in each repository system (GitHub, GitLab, Bitbucket). Keypup always considers that each pull request should receive at least one approving review.

  5. A reviewer rejection means the author of the pull request must perform additional work and request a re-review. This restarts the cycle to step (1).

  6. Once a pull request is green on all three aspects (review, build and base branch), it can be merged.

Based on the above lifecycle, the recommended action field on pull requests will present the following values:

  • Assign reviewer (suggested): The PR has not been updated in 3 days and has no reviewers assigned. The author may have finished their work and forgot to assign reviewers.

  • Assign missing reviewers (required): The PR has less reviewers assigned than the number of required approvals

  • Fix build: The PR has its build failing

  • Fix code: The PR has one reviewer who requested changes on the code

  • Merge: The PR is approved and has a green build. It is time to merge it.

  • None: The PR or Issue is merged or closed. Also used as a fallback value when Keypup couldn’t issue a useful recommendation.

  • Rebase: The PR is conflicting with the base branch and must be updated (rebased)

  • Review: The PR is currently waiting for reviewers to perform their reviews, until one request changes or the number of approving reviews exceeds the number of required approvals.


Recommended Actions On Issues

The recommended action on issues is much simpler as teams have many different completion workflows. Keypup takes the assumption that issues will broadly follow this lifecycle:

  • An issue must be implemented by a pull request. The relationship between the issue and its pull request is discovered via auto-closing keywords.

  • When an issue is related to an open pull request, it is considered as being implemented.

  • When all pull requests related to an issue have been closed or merged, Keypup considers that the issue should get closed at some point - probably after following some QA and release process on your side.

Therefore when it comes to issues, the recommended action field can present the following values:

  • Close: The issue should get closed in the near future - modulo post-development tasks such as QA, release, product validation - as all the resolving PRs have been merged or closed.

  • Implement: The issue is open and has no resolving PR yet.

  • Wait for implementation: The issue is resolved by one or several pull requests which are currently open (not merged or closed).

Did this answer your question?