Skip to content

PR Commits Count

Actions
Action to checks the count of commits in pull request
v1.0
Latest
Star (4)

Tags

 (1)

PR Commits Count javascript action

Action to checks the count of commits in pull request.

Inputs

source-branch

Source branch name (default {{github.head_ref}})

target-branch

Target branch name (default {{github.base_ref}})

except-branches

Excepted source branches (possible to pass multiple branches separated by ;)

commits-count

Possible count of commits (default 1)

Example usage

In the checkout task fetch-depth should be set to 0

uses: actions/checkout@v2
with:
  fetch-depth: 0

uses: sultansoy/pr-commits-count@v1.0
with:
  source-branch: ${{ github.head_ref }}
  target-branch: ${{ github.base_ref }}
  commits-count: 1
  except-branches: 'dev;test'

Same without except-branches:

uses: sultansoy/pr-commits-count@v1.0
if: ${{ github.head_ref != 'dev' && github.head_ref != 'test' }} with:
  source-branch: ${{ github.head_ref }}
  target-branch: ${{ github.base_ref }}
  commits-count: 1
  except-branches: 'dev'

PR Commits Count is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Action to checks the count of commits in pull request
v1.0
Latest

Tags

 (1)

PR Commits Count is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.