From 45f94d5bba3ef667797d461075469b4218e0b7d9 Mon Sep 17 00:00:00 2001 From: Jeff Welling Date: Tue, 20 Oct 2026 16:59:00 -0700 Subject: [PATCH] feat: add a pr-body input to oci-image-bump Passes the body to create-pull-request as body-path when set, so an empty input keeps the default body. The auto/deploy PRs this action creates need to carry the change-management sections enforced by IP-4105. --- .changeset/oci-image-bump-pr-body.md | 5 +++++ actions/oci-image-bump/action.yml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .changeset/oci-image-bump-pr-body.md diff --git a/.changeset/oci-image-bump-pr-body.md b/.changeset/oci-image-bump-pr-body.md new file mode 100644 index 000000000..1d89b4cd9 --- /dev/null +++ b/.changeset/oci-image-bump-pr-body.md @@ -0,0 +1,5 @@ +--- +"oci-image-bump": minor +--- + +Add a `pr-body` input to set the pull request body. Callers that do not set it keep the default body. diff --git a/actions/oci-image-bump/action.yml b/actions/oci-image-bump/action.yml index 14a3e6d41..0c7afe810 100644 --- a/actions/oci-image-bump/action.yml +++ b/actions/oci-image-bump/action.yml @@ -125,6 +125,12 @@ inputs: pr-title: description: "Title of the PR." required: true + pr-body: + description: | + Body of the PR. + + Leave empty to use the create-pull-request default body. + required: false outputs: pr-number: @@ -163,6 +169,17 @@ runs: exit 1 fi + # Writes the body to a file. An empty input keeps the action default body. + - name: Resolve PR body + id: pr-body + if: inputs.pr-body != '' + shell: bash + env: + PR_BODY: ${{ inputs.pr-body }} + run: | + printf '%s' "$PR_BODY" > "${RUNNER_TEMP}/pr-body.md" + echo "body-path=${RUNNER_TEMP}/pr-body.md" | tee -a "$GITHUB_OUTPUT" + # Commits, creates/pushes branch, and creates the PR. - name: Create PR id: create-pr @@ -174,6 +191,7 @@ runs: labels: ${{ inputs.pr-labels }} sign-commits: true title: ${{ inputs.pr-title }} + body-path: ${{ steps.pr-body.outputs.body-path }} token: ${{ inputs.github-token }} - name: Add PR to Summary