Skip to content

Commit 7550636

Browse files
committed
fix PR
1 parent 9c91444 commit 7550636

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/gen-release-pr.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
with:
3232
token: ${{ secrets.GITHUB_TOKEN }}
3333
fetch-depth: 0
34+
ref: ${{ github.event.workflow_run.head_sha || github.ref }}
3435

3536
- name: Check if this is a release commit
3637
id: check-release
@@ -79,13 +80,13 @@ jobs:
7980
8081
LABELED_PR_LIST="$LABELED_PR_LIST #$PR_NUM"
8182
82-
if echo "$LABELS" | grep -q "major"; then
83+
if echo "$LABELS" | grep -qx "major"; then
8384
MAJOR_COUNT=$((MAJOR_COUNT + 1))
8485
MAJOR_PRS="$MAJOR_PRS\n- $PR_TITLE (#$PR_NUM)"
85-
elif echo "$LABELS" | grep -q "minor"; then
86+
elif echo "$LABELS" | grep -qx "minor"; then
8687
MINOR_COUNT=$((MINOR_COUNT + 1))
8788
MINOR_PRS="$MINOR_PRS\n- $PR_TITLE (#$PR_NUM)"
88-
elif echo "$LABELS" | grep -q "patch"; then
89+
elif echo "$LABELS" | grep -qx "patch"; then
8990
PATCH_COUNT=$((PATCH_COUNT + 1))
9091
PATCH_PRS="$PATCH_PRS\n- $PR_TITLE (#$PR_NUM)"
9192
fi

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
IS_RELEASE: ${{ steps.check_msg.outputs.IS_RELEASE }}
2323
steps:
2424
- uses: actions/checkout@v4
25+
with:
26+
ref: ${{ github.event.workflow_run.head_sha }}
2527

2628
- name: Check latest commit message
2729
id: check_msg
@@ -42,6 +44,7 @@ jobs:
4244
- uses: actions/checkout@v4
4345
with:
4446
fetch-depth: 0
47+
ref: ${{ github.event.workflow_run.head_sha }}
4548

4649
- name: Download artifact
4750
uses: dawidd6/action-download-artifact@v6

0 commit comments

Comments
 (0)