Skip to content

Commit

Permalink
Pull #12909: Fail set-milestone if no milestone is found
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyanK7 authored and rnveach committed Mar 25, 2023
1 parent ef906a3 commit 9b47a50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .ci/set-milestone-on-referenced-issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ MILESTONE=$(curl --fail-with-body -s \
https://api.github.com/repos/checkstyle/checkstyle/milestones)
MILESTONE_NUMBER=$(echo "$MILESTONE" | jq .[0].number)
MILESTONE_TITLE=$(echo "$MILESTONE" | jq -r .[0].title)

if [ "$MILESTONE_NUMBER" == "null" ]; then
echo "[ERROR] No milestone is found."
exit 1
fi

echo "MILESTONE_NUMBER=$MILESTONE_NUMBER"
echo "MILESTONE_TITLE=$MILESTONE_TITLE"

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ or set of validation rules (best practices).
[![][closed issues img]][closed issues]
[![][link check img]][link check]

[![][milestone img]][milestone]

Members chat: [![][gitter_mem img]][gitter_mem]
Contributors chat: [![][gitter_con img]][gitter_con]

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

[checker framework]:https://github.com/checkstyle/checkstyle/actions/workflows/checker-framework.yml
[checker framework img]:https://github.com/checkstyle/checkstyle/actions/workflows/checker-framework.yml/badge.svg

[milestone]:https://github.com/checkstyle/checkstyle/actions/workflows/set-milestone-on-referenced-issue.yml
[milestone img]:https://github.com/checkstyle/checkstyle/actions/workflows/set-milestone-on-referenced-issue.yml/badge.svg

0 comments on commit 9b47a50

Please sign in to comment.