Skip to content

Commit

Permalink
build: add PR lint action
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai committed Sep 22, 2020
1 parent dc893fe commit 99aa49e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/prlint.json

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Lint

on:
pull_request:
# By default, a workflow only runs when a pull_request's activity type is opened, synchronize, or reopened. We
# explicity override here so that PR titles are re-linted when the PR text content is edited.
#
# Possible values: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
types: [opened, edited, reopened, synchronize]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: morrisoncole/pr-lint-action@v1.3.0
with:
title-regex: ^(build|chore|ci|docs|feat|fix|perf|refactor|style|test|other)((.+))?:\\s.+
on-failed-regex-fail-action: true
on-failed-regex-create-review: true
on-failed-regex-comment:
"Please format your PR title to match: `%regex%`!"
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 99aa49e

Please sign in to comment.