From 8bef04fe9a304b4b80e3ed2bba708688b6334930 Mon Sep 17 00:00:00 2001 From: Kyle Ebbinga <26614720+TheGuitarleader@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:43:06 -0600 Subject: [PATCH 1/7] Update dotnet-build.yml to remove pull_request trigger Removed pull_request trigger for main branch. --- .github/workflows/dotnet-build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 0c7b168..8197a46 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -3,8 +3,6 @@ name: Build .NET Project on: push: branches: [ main ] - pull_request: - branches: [ main ] jobs: validate: From 2ddf2060f3808c21dc549d338921cddbb331e56e Mon Sep 17 00:00:00 2001 From: Kyle Ebbinga <26614720+TheGuitarleader@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:47:09 -0600 Subject: [PATCH 2/7] Enhance GitHub Actions workflow with validation Added code validation step and modified automerge conditions. --- .github/workflows/github-merge.yml | 39 ++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-merge.yml b/.github/workflows/github-merge.yml index 4f65501..62047cc 100644 --- a/.github/workflows/github-merge.yml +++ b/.github/workflows/github-merge.yml @@ -9,12 +9,41 @@ permissions: contents: write jobs: - enable-automerge: + validate: + name: Code Validation runs-on: ubuntu-latest + steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ vars.DOTNET_VERSION }} + - name: Check code formatting + run: dotnet format --verify-no-changes + + build: + name: Build Project + needs: validate + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ vars.DOTNET_VERSION }} + + - name: Restore dependencies + run: dotnet restore + + enable-automerge: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + needs: build + steps: - name: Check PR author role id: check_author env: @@ -27,8 +56,8 @@ jobs: echo "PR author: $AUTHOR, permission: $PERMISSION" # Only allow if admin or maintain - if [[ "$PERMISSION" != "admin" && "$PERMISSION" != "maintain" ]]; then - echo "Author is not admin or maintainer. Exiting." + if [[ "$PERMISSION" != "admin" ]]; then + echo "Author is not admin. Exiting." exit 1 fi From 4576e409611170d520729ee5d3d08e64dad14a72 Mon Sep 17 00:00:00 2001 From: Kyle Ebbinga <26614720+TheGuitarleader@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:52:36 -0600 Subject: [PATCH 3/7] Enable auto merge for pull requests --- .github/workflows/github-merge.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-merge.yml b/.github/workflows/github-merge.yml index 62047cc..a153403 100644 --- a/.github/workflows/github-merge.yml +++ b/.github/workflows/github-merge.yml @@ -39,7 +39,8 @@ jobs: - name: Restore dependencies run: dotnet restore - enable-automerge: + automerge: + name: Auto Merge PR if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest needs: build From 8e0f30b9965f7d5691ace02e5e31483c0366ed20 Mon Sep 17 00:00:00 2001 From: Kyle Ebbinga <26614720+TheGuitarleader@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:59:31 -0600 Subject: [PATCH 4/7] Simplify GitHub Actions workflow by removing jobs Removed validation and build jobs, keeping only the automerge job. --- .github/workflows/github-merge.yml | 33 +----------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/.github/workflows/github-merge.yml b/.github/workflows/github-merge.yml index a153403..3499010 100644 --- a/.github/workflows/github-merge.yml +++ b/.github/workflows/github-merge.yml @@ -8,42 +8,11 @@ permissions: pull-requests: write contents: write -jobs: - validate: - name: Code Validation - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ vars.DOTNET_VERSION }} - - - name: Check code formatting - run: dotnet format --verify-no-changes - - build: - name: Build Project - needs: validate - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ vars.DOTNET_VERSION }} - - - name: Restore dependencies - run: dotnet restore - +jobs: automerge: name: Auto Merge PR if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest - needs: build steps: - name: Check PR author role id: check_author From 15be004c6cd19efaa420074e4c93f3d3f7104c97 Mon Sep 17 00:00:00 2001 From: Kyle Ebbinga <26614720+TheGuitarleader@users.noreply.github.com> Date: Sat, 13 Dec 2025 03:00:23 -0600 Subject: [PATCH 5/7] Add pull_request trigger to dotnet-build workflow --- .github/workflows/dotnet-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 8197a46..0c7b168 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -3,6 +3,8 @@ name: Build .NET Project on: push: branches: [ main ] + pull_request: + branches: [ main ] jobs: validate: From 4a8144831bbb52abdbbbf765f3605c7a7ef8dac2 Mon Sep 17 00:00:00 2001 From: Kyle Ebbinga <26614720+TheGuitarleader@users.noreply.github.com> Date: Sat, 13 Dec 2025 03:33:35 -0600 Subject: [PATCH 6/7] Add CODEOWNERS file for repository ownership --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..02ba421 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @TheGuitarleader From 342d6d13e5ab7396d318f82a85d7981c1c19f84a Mon Sep 17 00:00:00 2001 From: Kyle Ebbinga <26614720+TheGuitarleader@users.noreply.github.com> Date: Sat, 13 Dec 2025 04:17:46 -0600 Subject: [PATCH 7/7] Delete .github/workflows/github-merge.yml --- .github/workflows/github-merge.yml | 45 ------------------------------ 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/github-merge.yml diff --git a/.github/workflows/github-merge.yml b/.github/workflows/github-merge.yml deleted file mode 100644 index 3499010..0000000 --- a/.github/workflows/github-merge.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Auto Merge PRs - -on: - pull_request: - types: [opened, reopened, synchronize] - -permissions: - pull-requests: write - contents: write - -jobs: - automerge: - name: Auto Merge PR - if: github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-latest - steps: - - name: Check PR author role - id: check_author - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - AUTHOR="${{ github.event.pull_request.user.login }}" - REPO="${{ github.repository }}" - PERMISSION=$(gh api repos/$REPO/collaborators/$AUTHOR/permission --jq '.permission') - - echo "PR author: $AUTHOR, permission: $PERMISSION" - - # Only allow if admin or maintain - if [[ "$PERMISSION" != "admin" ]]; then - echo "Author is not admin. Exiting." - exit 1 - fi - - - name: Check if PR is draft - if: ${{ github.event.pull_request.draft == true }} - run: | - echo "PR is a draft. Exiting." - exit 1 - - - name: Enable auto-merge - uses: peter-evans/enable-pull-request-automerge@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - pull-request-number: ${{ github.event.pull_request.number }} - merge-method: merge