Skip to content

Commit fe9a0cc

Browse files
Merge pull request #99 from VirdocsSoftware/ar-CORE-2259-honor-the-skip-release-notes-label
feat: honor the skip-release-notes label (CORE-2259)
2 parents 18e3e7a + 6aafce3 commit fe9a0cc

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/actions/tag-jira-release/jira_tag_tickets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function get_tickets_in_current_branch() {
107107
echo "Checking for tickets between $(get_current_branch) and $target_branch" >&2
108108
local ticket_info="$($TICKET_STATUS_PATH $(get_current_branch) $target_branch)"
109109
echo "$ticket_info" >&2
110-
echo "$ticket_info" | grep -v '"Done"' | grep -v "Cancelled" | jq -r .url | sort | uniq | sed 's/https:\/\/'$JIRA_DOMAIN'\/browse\///g'
110+
echo "$ticket_info" | grep -v '"Done"' | grep -v "Cancelled" | grep -v '"skip-release-notes"' | jq -r .url | sort | uniq | sed 's/https:\/\/'$JIRA_DOMAIN'\/browse\///g'
111111
}
112112

113113
function existing_version() {

.github/actions/tag-jira-release/ticket_status.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,22 @@ function getTicketInfo() {
4848
fi
4949
}
5050

51+
function hasSkipReleaseNotes() {
52+
commitHash=$1
53+
LOG=$(git show $commitHash | sed '/^diff/,$d')
54+
if [[ "$LOG" =~ \[skip-release-notes\] ]]; then
55+
echo -n ",\"skip-release-notes\":true"
56+
fi
57+
}
58+
5159
while IFS= read -r hash; do
5260
FILE=~/temp/$hash.txt
5361
if [ -f "$FILE" ]; then
5462
while IFS= read -r ticketId; do
5563
if [ "$ticketId" != "" ]; then
5664
echo -n "{\"hash\":\"$hash\","
5765
getTicketInfo $ticketId
66+
hasSkipReleaseNotes $hash
5867
echo "}"
5968
fi
6069
done <<< "$(cat $FILE | sed 's/ /\n/g')"

0 commit comments

Comments
 (0)