fix: test PR #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Label PR | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - edited | |
| branches: | |
| - master | |
| - feature/v3 #TODO: remove | |
| concurrency: | |
| group: label-pr-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| label-pr: | |
| if: github.event.action == 'opened' || github.event.changes.title | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Update PR labels | |
| id: update-pr-labels | |
| uses: ytanikin/pr-conventional-commits@1.5.2 | |
| with: | |
| task_types: '["feat","fix","docs","ci"]' | |
| continue-on-error: true | |
| - name: Warn about invalid PR title | |
| if: steps.update-pr-labels.outcome == 'failure' | |
| run: gh pr comment "$PR_NUMBER" --body "$BODY" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| BODY: | | |
| 👋 Hey @${{ github.event.pull_request.user.login }}, it looks like the PR title doesn't follow the [Conventional Commits](https://www.conventionalcommits.org) format. | |
| While it's not a blocker for this PR, following the conventional commits format helps us to automatically calculate next release version, categorize changes and generate changelog. | |
| Good candidates might be `feat: ${{ github.event.pull_request.title }}` or `fix: ${{ github.event.pull_request.title }}`. You can also add `!` to indicate a breaking change, e.g. `feat!: ${{ github.event.pull_request.title }}`. | |
| Please follow the [Conventional Commits](https://www.conventionalcommits.org) for more details and examples. 🙌 |