From 9e94196474e27a0f089825156bf9991d1200bd9b Mon Sep 17 00:00:00 2001 From: Chance <139784371+UnicornChance@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:24:01 -0600 Subject: [PATCH 1/2] Create merge-commit.yaml --- .github/workflows/merge-commit.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/merge-commit.yaml diff --git a/.github/workflows/merge-commit.yaml b/.github/workflows/merge-commit.yaml new file mode 100644 index 000000000..e91135eeb --- /dev/null +++ b/.github/workflows/merge-commit.yaml @@ -0,0 +1,28 @@ +name: Update Merge Commit Title + +on: + pull_request: + types: [closed] + +jobs: + update-merge-commit: + if: github.event.pull_request.merged == true && contains(github.event.pull_request.head.ref, 'release-please--branches--main') == false + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Configure git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Get merge commit SHA + id: get_commit_sha + run: echo "MERGE_COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV + + - name: Update merge commit message + run: | + git commit --amend -m "this is a test" + git push --force From b0367f7dfba8664bad0b8e47df25316e37c82d72 Mon Sep 17 00:00:00 2001 From: Chance <139784371+UnicornChance@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:27:31 -0600 Subject: [PATCH 2/2] Update merge-commit.yaml --- .github/workflows/merge-commit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-commit.yaml b/.github/workflows/merge-commit.yaml index e91135eeb..bfcbae6f0 100644 --- a/.github/workflows/merge-commit.yaml +++ b/.github/workflows/merge-commit.yaml @@ -1,6 +1,6 @@ name: Update Merge Commit Title -on: +on: pull_request: types: [closed]