File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 16
16
GHA_CI : 1
17
17
18
18
jobs :
19
+ changelog :
20
+ runs-on : ubuntu-latest
21
+
22
+ steps :
23
+ - name : Checkout
24
+
25
+ with :
26
+ ref : ${{ github.ref }}
27
+ - name : Check Changelog
28
+ run : |
29
+ MESSAGE=$(git log --format=%B -n 1)
30
+ PR=$(echo "$MESSAGE" | grep -o "#[0-9]*" | head -1 | sed -e 's/^#//')
31
+ output=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
32
+ python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
33
+ grep "^changelog: " | \
34
+ sed "s/changelog: //g")
35
+ if [[ -z "$output" ]]; then
36
+ echo "ERROR: PR body must contain 'changelog: ...'"
37
+ exit 1
38
+ elif [[ "$output" = "none" ]]; then
39
+ echo "WARNING: changelog is 'none'"
40
+ fi
19
41
base :
42
+ needs : changelog
20
43
strategy :
21
44
matrix :
22
45
os : [ubuntu-latest, windows-latest, macos-latest]
You can’t perform that action at this time.
0 commit comments