Skip to content

Elfo404/grafana-pr-title-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pull Request Title Checker

This action checks if PR titles conform to the Contribution Guidelines ☑️

Consistent title names help maintainers organise their projects better 📚

Shows if the author has reaaaaally read the Contribution Guidelines :P

Usage

Create a config file .github/grafana-pr-title-checker-config.json like this one below:

{
  "LABEL": {
    "name": "title needs formatting",
    "color": "EEEEEE"
  },
  "CHECKS": {
    "prefixes": ["fix: ", "feat: "],
    "regexp": "docs\\(v[0-9]\\): ",
    "ignoreLabels": ["dont-check-PRs-with-this-label", "meta"]
  }
}

If none of the checks pass, a label will be added to that pull request.
If at least one of them passes, the label will be removed.

This action causes CI tests to fail by default. However, if you don't want CI tests failing just because of this action, simply set alwaysPassCI as true in the CHECKS field.

Also, adding label names to the optional ignoreLabels field will forfeit any checks for PRs with those labels.

Create Workflow

Create a workflow (eg: .github/workflows/pr-title-cheker.yml see Creating a Workflow file) to utilize the pr-title-checker action with content:

name: "PR Title Checker"
on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize
      - labeled
      - unlabeled

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: thehanimo/pr-title-checker@v1.2
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published