Skip to content

build(deps): bump the rust-dependencies group across 1 directory with 9 updates #71

build(deps): bump the rust-dependencies group across 1 directory with 9 updates

build(deps): bump the rust-dependencies group across 1 directory with 9 updates #71

Workflow file for this run

name: Commit Email Check
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
validate:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract commit emails
run: |
BASE_SHA=${{ github.event.pull_request.base.sha }}
HEAD_SHA=${{ github.event.pull_request.head.sha }}
git log --format='%ae' $BASE_SHA..$HEAD_SHA | sort -u > commit-emails.txt
- uses: taiki-e/install-action@v2
with:
tool: check-commits-email
- name: Run validation
id: check
run: |
check-commits-email \
--rules .github/email-blacklist.txt \
--emails commit-emails.txt \
--output github >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Violation of email address detected
- name: Post comment
if: steps.check.outputs.violations != ''
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: |
### ⚠️ Violation of email address detected
The following email(s) match the blacklist rule:
${{ steps.check.outputs.violations }}
<details>
<summary>Correction steps</summary>
1. Modifying author information using interactive rebase
```bash
git rebase -i HEAD~${{ github.event.pull_request.commits }}
# Mark the commit that needs to be modified as edit
```
2. For each marked commit, execute:
```bash
git commit --amend --author="username <other-email.com>"
git rebase --continue
```
3. Force push update branch
```bash
git push --force-with-lease
```
</details>
- name: Delete comment
if: ${{ steps.find-comment.outputs.comment-id != '' && steps.check.outputs.violations == '' }}
uses: detomarco/delete-comment@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}