fix: scope release-please app token to least privilege #79
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: Commitlint | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| jobs: | |
| commitlint: | |
| name: Lint commit messages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "0.9.*" | |
| enable-cache: false | |
| - name: Check commit messages | |
| env: | |
| EVENT_BEFORE: ${{ github.event.before }} | |
| EVENT_AFTER: ${{ github.event.after }} | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| run: | | |
| BEFORE="$EVENT_BEFORE" | |
| AFTER="$EVENT_AFTER" | |
| if [ "$BEFORE" = "0000000000000000000000000000000000000000" ]; then | |
| BEFORE="$(git merge-base "origin/$DEFAULT_BRANCH" "$AFTER")" | |
| fi | |
| uv run --with 'commitizen==4.13.9' --isolated \ | |
| cz check --rev-range "$BEFORE..$AFTER" |