mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
* chore: allow `!` to indicate breaking changes * chore: update commit convention too --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
36 lines
874 B
YAML
36 lines
874 B
YAML
name: 'PR Triage'
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- edited
|
|
- reopened
|
|
- synchronize
|
|
jobs:
|
|
label:
|
|
name: Label
|
|
if: github.event.action != 'edited'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Label pull request
|
|
uses: actions/labeler@v5
|
|
with:
|
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
|
sync-labels: true
|
|
validate-title:
|
|
name: Validate title
|
|
if: github.event.action != 'synchronize'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Validate pull request title
|
|
env:
|
|
TITLE: ${{ github.event.pull_request.title }}
|
|
run: |
|
|
REGEX="^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\\(.+\\))?!?: .{1,72}$"
|
|
|
|
echo "Title: \"$TITLE\""
|
|
|
|
if [[ ! "$TITLE" =~ $REGEX ]]; then
|
|
exit 1
|
|
fi
|