@@ -122,14 +122,13 @@ jobs:
122122 # trigger other workflows. So we use the token created in the
123123 # previous step.
124124 GITHUB_TOKEN : ${{ steps.setup-github-token.outputs.access-token }}
125- - name : Annotate release PR with streams build option
126- if : env.BUILD_STREAMS_ADAPTER_IMAGES == 'true'
125+ - name : Annotate release PR description
127126 env :
128127 GITHUB_TOKEN : ${{ steps.setup-github-token.outputs.access-token }}
129128 # We use gh pr list with exact title match instead of --search to avoid GitHub search index lag
130129 run : |
131130 PR_NUMBER=$(gh pr list \
132- --base main \
131+ --base "${{ github.ref_name }}" \
133132 --state open \
134133 --json number,title \
135134 --jq ".[] | select(.title == \"Release $BUMPED_VERSION\") | .number")
@@ -140,14 +139,22 @@ jobs:
140139 fi
141140
142141 PR_BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body')
143- MARKER='<!-- build-streams-adapter-images:true -->'
144142
145- if [[ "$PR_BODY" == *"$MARKER"* ]]; then
146- echo "Streams marker already present in PR body"
147- exit 0
143+ printf -v PR_BODY_PREFIX "This release was triggered by @%s.\n\n" "${{ github.actor }}"
144+ PR_BODY_SUFFIX=""
145+
146+ if [[ "$BUILD_STREAMS_ADAPTER_IMAGES" = "true" ]]; then
147+ MARKER='<!-- build-streams-adapter-images:true -->'
148+
149+ if [[ "$PR_BODY" == *"$MARKER"* ]]; then
150+ echo "Streams marker already present in PR body"
151+ exit 0
152+ fi
153+
154+ printf -v PR_BODY_SUFFIX "\n\n## Release Options\n%s\n- [x] Build streams adapter images\n" "$MARKER"
148155 fi
149156
150- UPDATED_BODY=$( printf "%s\n\n## Release Options\n%s\n- [x] Build streams adapter images\n" "$PR_BODY" "$MARKER")
157+ printf -v UPDATED_BODY "%s%s%s" "$PR_BODY_PREFIX" "$PR_BODY" "$PR_BODY_SUFFIX"
151158
152159 gh api \
153160 --method PATCH \
0 commit comments