From ec21b31c5965a2dcf677f84b0f956c8e4a933b96 Mon Sep 17 00:00:00 2001 From: Mikkel Jakobsen Date: Fri, 17 May 2024 09:54:23 +0200 Subject: [PATCH] Improving title/body on automated PR's --- .github/workflows/create-pr.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-pr.yml b/.github/workflows/create-pr.yml index 7fedeb005..df7610081 100644 --- a/.github/workflows/create-pr.yml +++ b/.github/workflows/create-pr.yml @@ -48,12 +48,19 @@ jobs: set -e git config --global user.name ${{ env.GIT_USER_NAME }} git config --global user.email ${{ env.GIT_USER_EMAIL }} + git checkout -b ${{ env.PR_BRANCH }} git push --set-upstream origin ${{ env.PR_BRANCH }} + git add composer.json composer.lock git commit -m "Insert new reference to dependency ${{ env.PACKAGE }}: ${{ env.BUILD_URL }}" git push - gh pr create --base develop --head ${{ env.PR_BRANCH }} --title "PR for ${{ env.PR_BRANCH }}" --body "This is an automated PR for ${{ env.PR_BRANCH }}" + + gh pr create \ + --base develop \ + --head ${{ env.PR_BRANCH }} \ + --title "${{ format('PR for {0}:{1}', env.PACKAGE, env.PR_BRANCH) }}" \ + --body "${{ format('This is an automated PR for {0}:{1}', env.PACKAGE, env.PR_BRANCH) }}" if: ${{ env.GIT_USER_NAME && env.GIT_USER_EMAIL && env.PACKAGE && env.PR_BRANCH && env.BUILD_URL && steps.manipulate_composer.outcome == 'success' }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}