@@ -181,6 +181,12 @@ jobs:
181181 auto-merge/bypass-ci-checks
182182 draft : true
183183
184+ # Switch to the PR branch so changelog add reads the bumped
185+ # GA version from metadata.yaml (not the RC version on master).
186+ - name : " Checkout PR branch"
187+ if : steps.create-pr.outputs.pull-request-number
188+ run : git fetch origin "finalize-rollout/promote/${CONNECTOR_NAME}" && git checkout "finalize-rollout/promote/${CONNECTOR_NAME}"
189+
184190 # changelog add reads the current version from metadata.yaml
185191 # (already bumped to GA by the promote step above) and writes
186192 # a changelog entry — no version files are modified.
@@ -194,21 +200,13 @@ jobs:
194200 --message "Promoted release candidate to GA"
195201 --pr-number "${{ steps.create-pr.outputs.pull-request-number }}"
196202
197- # Second create-pull-request call pushes the changelog commit
198- # to the existing PR branch.
203+ # Commit and push the changelog entry to the existing PR branch.
199204 - name : " Push changelog to PR"
200205 if : steps.create-pr.outputs.pull-request-number
201- uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
202- with :
203- token : ${{ steps.get-app-token.outputs.token }}
204- commit-message : " chore: add changelog for ${{ env.CONNECTOR_NAME }}"
205- branch : " finalize-rollout/promote/${{ env.CONNECTOR_NAME }}"
206- base : ${{ github.event.repository.default_branch }}
207- title : " chore: finalize promote for ${{ env.CONNECTOR_NAME }}"
208- body : |
209- Automated cleanup after connector rollout **promote** for `${{ env.CONNECTOR_NAME }}`.
210-
211- Generated by [`finalize_rollout` workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
206+ run : |
207+ git add docs/
208+ git commit -m "chore: add changelog for ${CONNECTOR_NAME}"
209+ git push origin "finalize-rollout/promote/${CONNECTOR_NAME}"
212210
213211 # The merge triggers the publish pipeline that
214212 # verifyDefaultVersionActivity is waiting for.
0 commit comments