Skip to content

feat: adds automatic labels to pull requests (#7) #28

feat: adds automatic labels to pull requests (#7)

feat: adds automatic labels to pull requests (#7) #28

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
branches:
- "*"
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name != 'pull_request' && github.sha || '' }}
cancel-in-progress: true
jobs:
lint:
name: ${{ matrix.tox.name }}
runs-on: [ubuntu-latest]
strategy:
fail-fast: false
matrix:
tox:
- name: codespell
environment: codespell
- name: mypy
environment: mypy
- name: ruff
environment: ruff
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install test dependencies
run: |
python -m pip install tox
- name: Run ${{ matrix.tox.name }} in lint
run: |
python -m tox -e ${{ matrix.tox.environment }}
apply-labels:
name: apply labels
permissions:
contents: read
pull-requests: write
runs-on: [ubuntu-latest]
steps:
- uses: actions/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: true
lint-commit-messages:
name: lint commit message
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install commitizen
run: |
python -m pip install commitizen
- name: Commitizen check
run: |
cz check --rev-range HEAD^!
lint-pr-title:
# default: lints titles using https://github.com/commitizen/conventional-commit-types
name: lint pr title
runs-on: [ubuntu-latest]
permissions:
pull-requests: read
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}