Skip to content

Commit 4a46020

Browse files
Return correct version in out
1 parent cdc4b4e commit 4a46020

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

assets/helpers/bitbucket.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ bitbucket_pullrequest_progress_comment() {
123123
# $2: hash of merge commit
124124
# $3: hash of source commit
125125
# $4: hash of target commit
126-
build_url="$ATC_EXTERNAL_URL/teams/$(rawurlencode $BUILD_TEAM_NAME)/pipelines/$(rawurlencode $BUILD_PIPELINE_NAME)/jobs/$(rawurlencode $BUILD_JOB_NAME)/builds/$(rawurlencode $BUILD_NAME)"
126+
build_url_job="$ATC_EXTERNAL_URL/teams/$(rawurlencode $BUILD_TEAM_NAME)/pipelines/$(rawurlencode $BUILD_PIPELINE_NAME)/jobs/$(rawurlencode $BUILD_JOB_NAME)"
127+
build_url="${build_url_job}/builds/$(rawurlencode $BUILD_NAME)"
127128
build_status_pre="[*Build"
128-
build_status_post="* **${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}** for $2"
129+
build_status_post="* at **[${BUILD_PIPELINE_NAME} > ${BUILD_JOB_NAME}]($build_url_job)** for $2"
129130
if [ "$2" == "$3" ]; then
130131
build_status_post+=" into $4]"
131132
else

assets/out

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,16 @@ if [ -n "$comments" ]; then
162162
fi
163163

164164
# edit timestamp to force new build when rebuild_phrase is included in comments
165-
if [ "$skip_verify" == "true" ]; then
165+
if [ "$skip_verify" != "true" ]; then
166166
if echo "$text" | grep -Ec "$rebuild_phrase" > /dev/null; then
167167
prq_verify_date=$(( ($(echo "$comment" | jq -r '.createdDate') + 500) / 1000))
168168
skip_verify=true
169169
fi
170170
fi
171+
172+
if [ "$skip_verify" == "true" -a "$commented" == "true" ]; then
173+
break
174+
fi
171175
done <<< "$comments"
172176
fi
173177

0 commit comments

Comments
 (0)