You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/checkNextChangelog.yml
+4-44Lines changed: 4 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,11 @@
1
1
name: Check for NEXT_CHANGELOG.md Changes
2
2
3
3
on:
4
-
pull_request_target:
4
+
pull_request:
5
5
branches: [ main ]
6
6
7
7
permissions:
8
8
contents: read
9
-
pull-requests: write
10
9
11
10
jobs:
12
11
check-next-changelog:
@@ -67,47 +66,8 @@ jobs:
67
66
echo "NO_CHANGELOG=true found in PR message. Skipping changelog check."
68
67
exit 0
69
68
else
70
-
echo "WARNING: file NEXT_CHANGELOG.md not changed. If this is expected, add NO_CHANGELOG=true to the PR message."
69
+
echo "ERROR: NEXT_CHANGELOG.md not changed and NO_CHANGELOG=true not found in PR message."
70
+
echo "Please update NEXT_CHANGELOG.md or add NO_CHANGELOG=true to the PR description."
71
71
exit 1
72
72
fi
73
-
fi
74
-
75
-
- name: Comment on PR with instructions if needed
76
-
if: failure() # This step will only run if the previous step fails (i.e., if NEXT_CHANGELOG.md was not modified and NO_CHANGELOG=true was not in the PR message)
77
-
env:
78
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79
-
run: |
80
-
# Check if a comment exists with the instructions
81
-
previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
91
-
If this is not necessary for your PR, please include the following in your PR description:
92
-
NO_CHANGELOG=true
93
-
and rerun the job."
94
-
fi
95
-
96
-
- name: Delete instructions comment on success
97
-
if: success() # This step will only run if the previous check passed (i.e., if NEXT_CHANGELOG.md was modified or NO_CHANGELOG=true is in the PR message)
98
-
env:
99
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100
-
run: |
101
-
# Check if there is a previous instructions comment
102
-
previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
0 commit comments