build(deps): bump clap from 4.6.1 to 4.6.2 #1673
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: Check PR Author | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened, synchronize] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| check-author: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout base repo (for AUTHORS file) | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ github.event.repository.default_branch }} | |
| - name: Check commit authors against AUTHORS file | |
| id: author_check | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| MISSING="" | |
| while IFS= read -r line; do | |
| [ -z "$line" ] && continue | |
| name=$(echo "$line" | cut -d';' -f1) | |
| email=$(echo "$line" | cut -d';' -f2) | |
| if ! grep -Fq "$email" AUTHORS && ! grep -Fq "$name" AUTHORS; then | |
| MISSING="$MISSING\n- $name <$email>" | |
| fi | |
| done < <(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/commits \ | |
| --paginate \ | |
| --jq '.[] | "\(.commit.author.name);\(.commit.author.email)"' \ | |
| | grep -v noreply.github.com | sort -u) | |
| if [ -n "$MISSING" ]; then | |
| echo "missing=true" >> "$GITHUB_OUTPUT" | |
| { | |
| echo 'missing_authors<<EOF' | |
| printf '%b' "$MISSING" | |
| echo | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| else | |
| echo "missing=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Find existing bot comment | |
| uses: peter-evans/find-comment@v4 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: 'github-actions[bot]' | |
| body-includes: "<!-- author-check -->" | |
| - name: Post or update notice comment | |
| if: steps.author_check.outputs.missing == 'true' | |
| uses: peter-evans/create-or-update-comment@v5 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| edit-mode: replace | |
| body: | | |
| <!-- author-check --> | |
| Hi, thanks for contributing! It looks like one or more commit authors are not yet listed in our [AUTHORS](AUTHORS) file: | |
| ${{ steps.author_check.outputs.missing_authors }} | |
| Please add your name and/or email to the AUTHORS file so we can acknowledge your work. This is not a blocker — just a friendly reminder! | |
| - name: Remove notice comment (all authors found) | |
| if: steps.author_check.outputs.missing == 'false' && steps.fc.outputs.comment-id != '' | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: ${{ steps.fc.outputs.comment-id }} | |
| }) |