From a816710db1f6aed903f911358e3cfbd5e924e3b3 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:02:25 -0700 Subject: [PATCH 1/9] Refactor comments in merge bot workflow for clarity and consistency Signed-off-by: Pieter Viljoen --- .github/workflows/merge-bot-pull-request.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index fc836bc5..32a1e6cf 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -13,7 +13,7 @@ jobs: merge-dependabot: name: Merge dependabot pull request job runs-on: ubuntu-latest - # Must come from dependabot, and the PR must be from the same repository to prevent abuse + # To prevent abuse merge must come from dependabot and be from the same repository if: >- github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository @@ -29,8 +29,12 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" + # Merge any non-nuget any update, e.g. github-actions often updates v1 to v2 + # Merge nuget only if minor and patch updates, e.g. major updates may build but break functionality - name: Merge pull request step - if: steps.metadata.outputs.update-type != 'version-update:semver-major' + if: >- + (steps.metadata.outputs.package-ecosystem != 'nuget') || + (steps.metadata.outputs.update-type != 'version-update:semver-major') run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} @@ -39,7 +43,7 @@ jobs: merge-codegen: name: Merge codegen pull request job runs-on: ubuntu-latest - # Must come from the codegen workflow, and the PR must be from the same repository to prevent abuse + # To prevent abuse merge must come from the codegen workflow and be from the same repository if: >- github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.head.ref == 'codegen' && From 9da2a403c2f9e00019b648acefbc14643bd3dd9f Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:08:03 -0700 Subject: [PATCH 2/9] Update .github/workflows/merge-bot-pull-request.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 32a1e6cf..8eca63bf 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -34,7 +34,10 @@ jobs: - name: Merge pull request step if: >- (steps.metadata.outputs.package-ecosystem != 'nuget') || - (steps.metadata.outputs.update-type != 'version-update:semver-major') + ( + (steps.metadata.outputs.update-type == 'version-update:semver-minor') || + (steps.metadata.outputs.update-type == 'version-update:semver-patch') + ) run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} From 54be732bb2a017174fc2d0dccf3cd6f974748679 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:08:23 -0700 Subject: [PATCH 3/9] Update .github/workflows/merge-bot-pull-request.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 8eca63bf..1b313fe7 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -46,7 +46,7 @@ jobs: merge-codegen: name: Merge codegen pull request job runs-on: ubuntu-latest - # To prevent abuse merge must come from the codegen workflow and be from the same repository + # To prevent abuse, the merge must come from the codegen workflow and the PR must originate from this repository if: >- github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.head.ref == 'codegen' && From 81ce6a5b65e03deb5e9d386c33fcbd35c6962712 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:08:36 -0700 Subject: [PATCH 4/9] Update .github/workflows/merge-bot-pull-request.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 1b313fe7..29300c9f 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -13,7 +13,7 @@ jobs: merge-dependabot: name: Merge dependabot pull request job runs-on: ubuntu-latest - # To prevent abuse merge must come from dependabot and be from the same repository + # To prevent abuse, the merge must come from Dependabot and the PR must originate from this repository. if: >- github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository From 645484978eb0b077c0ec7f6dd7e8b939f7dcac3c Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:08:52 -0700 Subject: [PATCH 5/9] Update .github/workflows/merge-bot-pull-request.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 29300c9f..06b6eae2 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -29,8 +29,8 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" - # Merge any non-nuget any update, e.g. github-actions often updates v1 to v2 - # Merge nuget only if minor and patch updates, e.g. major updates may build but break functionality + # Merge any non-NuGet update, e.g. GitHub Actions often updates v1 to v2 + # Merge NuGet only if minor and patch updates, e.g. major updates may build but break functionality - name: Merge pull request step if: >- (steps.metadata.outputs.package-ecosystem != 'nuget') || From 700e67113ef3544320ae5d294086ac31c0c76a46 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:13:52 -0700 Subject: [PATCH 6/9] Update .github/workflows/merge-bot-pull-request.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 06b6eae2..95114758 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -46,7 +46,7 @@ jobs: merge-codegen: name: Merge codegen pull request job runs-on: ubuntu-latest - # To prevent abuse, the merge must come from the codegen workflow and the PR must originate from this repository + # To prevent abuse, the merge must come from the codegen workflow, and the PR must originate from this repository. if: >- github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.head.ref == 'codegen' && From 1670bcf1e016d79a39547b6eb0cad01c9c7ea7b4 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:14:22 -0700 Subject: [PATCH 7/9] Update .github/workflows/merge-bot-pull-request.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 95114758..c86a6d52 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -30,7 +30,7 @@ jobs: github-token: "${{ secrets.GITHUB_TOKEN }}" # Merge any non-NuGet update, e.g. GitHub Actions often updates v1 to v2 - # Merge NuGet only if minor and patch updates, e.g. major updates may build but break functionality + # Merge NuGet only for minor and patch updates, e.g. major updates may build but break functionality - name: Merge pull request step if: >- (steps.metadata.outputs.package-ecosystem != 'nuget') || From 7f4e7429324538decebdd523b8748ea8c509eff9 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:25:03 -0700 Subject: [PATCH 8/9] Refactor comments for clarity in merge bot workflow Signed-off-by: Pieter Viljoen --- .github/workflows/merge-bot-pull-request.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index c86a6d52..463d8fe3 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -13,7 +13,7 @@ jobs: merge-dependabot: name: Merge dependabot pull request job runs-on: ubuntu-latest - # To prevent abuse, the merge must come from Dependabot and the PR must originate from this repository. + # To prevent abuse, the PR must come from Dependabot and the PR must originate from this repository. if: >- github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository @@ -29,15 +29,12 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" - # Merge any non-NuGet update, e.g. GitHub Actions often updates v1 to v2 - # Merge NuGet only for minor and patch updates, e.g. major updates may build but break functionality + # Merge any non-NuGet update, e.g. GitHub Actions often updates v1 to v2. + # Merge NuGet only for non-major updates, e.g. major updates may build but break functionality. - name: Merge pull request step if: >- (steps.metadata.outputs.package-ecosystem != 'nuget') || - ( - (steps.metadata.outputs.update-type == 'version-update:semver-minor') || - (steps.metadata.outputs.update-type == 'version-update:semver-patch') - ) + (steps.metadata.outputs.update-type != 'version-update:semver-major') run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} @@ -46,7 +43,7 @@ jobs: merge-codegen: name: Merge codegen pull request job runs-on: ubuntu-latest - # To prevent abuse, the merge must come from the codegen workflow, and the PR must originate from this repository. + # To prevent abuse, the PR must come from the codegen workflow, and the PR must originate from this repository. if: >- github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.head.ref == 'codegen' && @@ -71,7 +68,7 @@ jobs: merge-codegen-app: name: Merge codegen app pull request job runs-on: ubuntu-latest - # Must come from the codegen app workflow, and the PR must be from the same repository to prevent abuse + # To prevent abuse, the PR must come from the codegen app workflow, and the PR must be from the same repository. if: >- github.actor == 'ptr727-codegen[bot]' && github.event.pull_request.user.login == 'ptr727-codegen[bot]' && From 78386baa6aaaa9bfcfab1d2caedead17ad0af527 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 15 Apr 2026 11:28:21 -0700 Subject: [PATCH 9/9] Update .github/workflows/merge-bot-pull-request.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/merge-bot-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index 463d8fe3..4e27cfd6 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -68,7 +68,7 @@ jobs: merge-codegen-app: name: Merge codegen app pull request job runs-on: ubuntu-latest - # To prevent abuse, the PR must come from the codegen app workflow, and the PR must be from the same repository. + # To prevent abuse, the PR must come from the codegen app workflow, and the PR must originate from this repository. if: >- github.actor == 'ptr727-codegen[bot]' && github.event.pull_request.user.login == 'ptr727-codegen[bot]' &&