Skip to content

superbet-group/pr-name-check-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PR Name Check Action

What does it do

Example Screenshot

This action validates pull request titles. For example, it validates with the following formats:

[SW-123] text
[SGP-123] text
[no-ticket] text

The prefixes SW and SGP are configurable. Also the no-ticket string. If the pull request title doesn't satisfy the format, this action will notify you.

How it notifies you

Github Bot will request changes with a comment. When the title is corrected it will let the merge request pass.

How to use it

Example workflow file you should create in .github/workflows/pr-name-check.yml in your project. Adjust it to your needs.

name: PR Name Check

on:
  pull_request:
    types: [opened, edited, reopened]

jobs:
  pr-lint:
    runs-on: ubuntu-latest
    steps:
      - uses: superbet-group/[email protected]
        with:
          title-projects: SW|SGP
          title-fallback: no-ticket
          on-failed-regex-comment:
            "Oh no! I have to insist 👮\n\nPull request title can be in one of the following formats:\n%formats%"
          on-title-corrected-comment:
            "All good 🙋‍♂"
          repo-token: "${{ secrets.GITHUB_TOKEN }}"

Forked from https://github.com/MorrisonCole/pr-lint-action

About

Checks if pull request title matches defined format

Resources

License

Stars

Watchers

Forks

Packages

No packages published