Skip to content

Commit 9b47a50

Browse files
stoyanK7rnveach
authored andcommitted
Pull #12909: Fail set-milestone if no milestone is found
1 parent ef906a3 commit 9b47a50

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.ci/set-milestone-on-referenced-issue.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ MILESTONE=$(curl --fail-with-body -s \
4343
https://api.github.com/repos/checkstyle/checkstyle/milestones)
4444
MILESTONE_NUMBER=$(echo "$MILESTONE" | jq .[0].number)
4545
MILESTONE_TITLE=$(echo "$MILESTONE" | jq -r .[0].title)
46+
47+
if [ "$MILESTONE_NUMBER" == "null" ]; then
48+
echo "[ERROR] No milestone is found."
49+
exit 1
50+
fi
51+
4652
echo "MILESTONE_NUMBER=$MILESTONE_NUMBER"
4753
echo "MILESTONE_TITLE=$MILESTONE_TITLE"
4854

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ or set of validation rules (best practices).
2525
[![][closed issues img]][closed issues]
2626
[![][link check img]][link check]
2727

28+
[![][milestone img]][milestone]
29+
2830
Members chat: [![][gitter_mem img]][gitter_mem]
2931
Contributors chat: [![][gitter_con img]][gitter_con]
3032

@@ -191,3 +193,6 @@ are in the file named "LICENSE.apache20" in this directory.
191193

192194
[checker framework]:https://github.com/checkstyle/checkstyle/actions/workflows/checker-framework.yml
193195
[checker framework img]:https://github.com/checkstyle/checkstyle/actions/workflows/checker-framework.yml/badge.svg
196+
197+
[milestone]:https://github.com/checkstyle/checkstyle/actions/workflows/set-milestone-on-referenced-issue.yml
198+
[milestone img]:https://github.com/checkstyle/checkstyle/actions/workflows/set-milestone-on-referenced-issue.yml/badge.svg

0 commit comments

Comments
 (0)