ci: secure the license file #1101
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: Conventional Commits | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
jobs: | |
default: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Lint pull request title | |
uses: amannn/action-semantic-pull-request@v5 | |
id: lint | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
types: | | |
build | |
chore | |
ci | |
docs | |
feat | |
fix | |
perf | |
style | |
refactor | |
test | |
- name: Post lint error comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: always() && (steps.lint.outputs.error_message != null) | |
with: | |
header: lint-error | |
message: | | |
Hey there! 👋 | |
We noticed that the title of your pull request doesn't follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. To ensure consistency, we kindly ask you to adjust the title accordingly. | |
Here are the details: | |
``` | |
${{ steps.lint.outputs.error_message }} | |
``` | |
- name: Remove lint error comment | |
if: ${{ steps.lint.outputs.error_message == null }} | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
header: lint-error | |
delete: true |