Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
chore: add action to enforce semantic-pr titles#6075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Semantic PR Titles | ||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# keep this synchronized with the /CONTRIBUTING.md | ||
types: | | ||
docs | ||
feat | ||
fix | ||
test | ||
chore | ||
# deps is used by renovate for its PRs | ||
scopes: | | ||
deps | ||
ast-spec | ||
eslint-plugin | ||
eslint-plugin-internal | ||
eslint-plugin-tslint | ||
experimental-utils | ||
parser | ||
scope-manager | ||
type-utils | ||
types | ||
typescript-estree | ||
utils | ||
visitor-keys | ||
website | ||
# we allow "cross package" PRs with no scope | ||
requireScope: false | ||
# ensure that the subject is lower-case first | ||
# also allows "[rule-name] " prefix for eslint-plugin rule PRs | ||
# https://regexr.com/733ed | ||
subjectPattern: ^(\[[a-z\-]+\] )?[a-z].+[^\.]$ | ||
subjectPatternError: | | ||
The "subject" must start with a lower-case letter and must not | ||
end with a full-stop. | ||
For PRs that add or change ESLint-plugin rules, you should begin | ||
the title with "[rule-name] " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It'd be nice if this was enforceable too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. yeah it's just hard cos if you're making non-rule-specific changes you don't want to add it - so it's hard to properly enforce. |