Pull request title convention
  • Updated on 06 May 2019
  • 1 minute to read
  • Contributors
  • Share
  • Dark
    Light

Pull request title convention

  • Share
  • Dark
    Light

This rule ensures the pull request title includes a reference to an issue tracking system ticket.

Pull requests are automatically linked if the issue key included in the pull request title (e.g. โ€œPROJECT-123 fix: Update auth flow for new usersโ€)

Use case(s)

  • Create a logical link between planning (tracking system) and the subsequent code change (GitHub)
  • Recommended requirement for SOC2 complaint

How to implement?

This policy will work only if implemented inside each CircleCi config file
Want to enforce this rule, with a single click, on the Git level? Check our built-in policy!
orbs:
  datree: datree/policy@latest
description: A circle-ci job to enforce Datree's pull request title convention rule
jobs:
  my_job:
    docker:
      - image: 'circleci/node:10'
    steps:
      - datree/branch-name-convention:
          issue_tracker: jira
version: 2.1
workflows:
  main:
    jobs:
      - my_job:
          context: github-token-context
Extended version of this guide can be found on CircleCi Datree/Policy Orb documentation

When does this rule fail?

If there is no reference to (issue tracking system) ticket number in the Pull Request title.

GitHub view:

Screen Shot 2019-05-06 at 15.18.27

CircleCi view:

Screen Shot 2019-05-06 at 16.23.25

How to fix?

Follow the instructions on this guide.

Was this article helpful?