Workflow step requirements

These are rules that must be met for a pull request to move on to the next step. Because steps are evaluated in order, you can think of the step requirements as a series of "gates" or "checks" that a pull request must pass to receive a successful status in GitHub.

Requirements are written as expressions that have direct access to the GitHub API. So, in addition to requiring your review teams to approve a pull request, you can also set up "pre-requisites" that need to met before a review takes place, or "post-requisites" that need to be met after review but before a pull request can be merged.

Examples of requirements:

  • Team approval: teams.all_approved or team["Team name"].approved
  • GitHub checks status: "test" in pull.check_runs.succeeded
  • Requiring PR labels: len(pull.labels) > 0
  • Requiring specific files to be changed: "file.txt" in pull.files
  • Preventing specific files from being changed: "file.txt" not in pull.files