add user27182 as a contributor for code #468
Workflow file for this run
This file contains 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
# Reference: | |
# - https://github.com/actions/checkout | |
# - https://github.com/actions/setup-python | |
# - https://github.com/snnaplab/get-labels-action | |
# - https://github.com/dorny/paths-filter | |
name: ci-changelog | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
push: | |
branches: | |
- "!main" | |
tags: | |
- "!v*" | |
workflow_dispatch: | |
jobs: | |
changelog: | |
name: 'validate changelog' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
if: github.actor != 'pre-commit-ci[bot]' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: 'get PR labels' | |
uses: snnaplab/get-labels-action@f426df40304808ace3b5282d4f036515f7609576 | |
- name: 'filter changelog' | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | |
id: changes | |
with: | |
filters: | | |
changelog: | |
- 'changelog/**' | |
list-files: 'csv' | |
- name: 'validate changelog' | |
if: ${{ ! contains(fromJSON(env.LABELS), 'skip changelog') }} | |
env: | |
CHANGELOG: "${{ steps.changes.outputs.changelog_files }}" | |
PR: "${{ github.event.number }}" | |
SCRIPTS: "./.github/scripts" | |
run: | | |
python -m pip install click towncrier | |
python -c "import sys; print(f'version = {sys.version}')" | |
towncrier --version | |
python ${SCRIPTS}/changelog.py "${PR}" "${CHANGELOG}" |