Skip to content

Commit

Permalink
chore: changeset check
Browse files Browse the repository at this point in the history
  • Loading branch information
kiner-tang committed Dec 29, 2023
1 parent eca6e8a commit 4688b52
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/changeset-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ jobs:

- name: Check for major changes
run: |
changed_files=$(git diff --name-only HEAD..HEAD~1)
major_changes=$(echo "$changed_files" | grep ".changeset" | grep -c "major")
changed_files=$(git diff --name-only "HEAD..HEAD~1")
files=$(echo "$changed_files" | grep "\.changeset")
major_changes=$(grep -c "major" $files)
echo "$major_changes major changes found."
if [ "$major_changes" -gt 0 ]; then
comment="@${{ github.actor }}, 本次 PR 的更改包含 major 变更,请确认是否符合预期。<!-- AUTO_CHANGESET_CHECK_HOOK -->"
echo "$comment" > comment_body.txt
Expand Down

0 comments on commit 4688b52

Please sign in to comment.