Skip to content

Commit 65f7bb8

Browse files
committed
fixup! fixup! Check if changelog exists
1 parent 7c50983 commit 65f7bb8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/clippy_bors.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23+
- name: Checkout
24+
uses: actions/[email protected]
25+
with:
26+
ref: ${{ github.ref }}
2327
- name: Check Changelog
2428
run: |
25-
MESSAGE=$(git log --format=%B -n 1 ${{ github.sha }})
29+
MESSAGE=$(git log --format=%B -n 1)
30+
PR=$(echo "$MESSAGE" | grep -o "#[0-9]*" | sed -e 's/#//')
2631
echo $MESSAGE
32+
echo $PR
2733
exit 1
28-
PR=$(echo "${{ github.ref }}" | grep -o "[0-9]*")
2934
output=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
3035
python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
3136
grep "^changelog: " | \

0 commit comments

Comments
 (0)