feat(changelog): add changelog #1
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: Fragments check | |
| on: | |
| pull_request: | |
| types: [labeled, unlabeled, opened, reopened, synchronize] | |
| branches: | |
| - main | |
| jobs: | |
| check-fragment-added: | |
| if: github.event.pull_request.user.type != 'Bot' && !contains(github.event.pull_request.labels.*.name, 'skip-fragment-check') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check if changelog fragment was added | |
| run: | | |
| uv sync --frozen --only-group towncrier | |
| if ! towncrier check --compare-with origin/${{ github.base_ref }}; then | |
| exit 1 | |
| fi | |
| - name: Check if linked to the correct pull request | |
| run: | | |
| diff=$(git diff origin/${{ github.base_ref }} HEAD --name-only) | |
| changelog_fragments=$(echo "$diff" | grep "^.changes/unreleased/") | |
| echo changelog_fragments | |