Skip to content

docs(coc): add report link to code of conduct #6

docs(coc): add report link to code of conduct

docs(coc): add report link to code of conduct #6

name: Label Pull Requests
# Labels a pull request by all the commit types. So if a PR contains the
# following commits: `feat: xyz`, `test: xyz`, and `docs: xyz` then this
# pull request will get the `feat`, `test`, and `docs` labels.
#
# Future features:
# add `BREAKING CHANGE` label when a commit says it is a breaking change.
on:
pull_request_target:
branches: [main, master, release, development]
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
label-pull-requests:
name: Label Pull Requests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
with: { fetch-depth: 0 }
- name: Extract possible types/labels
id: extract_types
run: |
types=$(yq -r '.[] | select(.type == true) | .name' .github/labels.yaml | paste -sd, -)
echo "types=$types" >> "$GITHUB_OUTPUT"
- name: Enforce Conventional Commits
uses: webiny/[email protected]
with:
allowed-commit-types: ${{ steps.extract_types.outputs.types }}
- name: Label Pull Request based on commits
uses: FritjofH/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
task_types: ${{ steps.extract_types.outputs.types }}
custom_labels: "{}"
link_on_failure: true
add_scope_label: false
add_label: true