From 8787245cca110fa03af74a9160142c7728a14504 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 16:18:53 +0000 Subject: [PATCH 1/3] fix: configure git identity before creating annotated tag in create-release action Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/c84a8f7f-a0df-4033-86f8-0d7121d0ffae Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com> --- .github/actions/github/create-release/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/github/create-release/action.yml b/.github/actions/github/create-release/action.yml index cc93fc7f..9dbb9c84 100644 --- a/.github/actions/github/create-release/action.yml +++ b/.github/actions/github/create-release/action.yml @@ -25,6 +25,11 @@ runs: echo "notes-start-tag=${{ inputs.notes-start-tag }}" echo "notes-start-tag-argument=${{ inputs.notes-start-tag != '' && format('--notes-start-tag {0}', inputs.notes-start-tag) || '' }}" shell: bash + - name: 'Configure git identity' + shell: bash + run: | + git config user.name "$(git log -n 1 --pretty=format:%an)" + git config user.email "$(git log -n 1 --pretty=format:%ae)" - name: 'Create git tag ${{ inputs.release-version }}' shell: bash run: | From 0c2387c231bb20b03f68df867169ea320a23acab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 16:24:49 +0000 Subject: [PATCH 2/3] refactor: extract git identity config into a reusable composite action Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/c4363748-3a51-4b83-9c29-575de1199116 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com> --- .github/actions/git/configure-identity/action.yml | 12 ++++++++++++ .github/actions/git/push-changes/action.yml | 6 ++++-- .github/actions/github/create-release/action.yml | 5 +---- .github/workflows/backtrack.yml | 4 +--- .github/workflows/bump-version.yml | 4 +--- .github/workflows/release.yml | 6 ++++-- 6 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 .github/actions/git/configure-identity/action.yml diff --git a/.github/actions/git/configure-identity/action.yml b/.github/actions/git/configure-identity/action.yml new file mode 100644 index 00000000..ece38a74 --- /dev/null +++ b/.github/actions/git/configure-identity/action.yml @@ -0,0 +1,12 @@ +name: 'Configure git identity' +author: 'Pete Sramek' +description: 'Configures git user name and email from the last commit.' + +runs: + using: composite + steps: + - name: 'Configure git identity' + shell: bash + run: | + git config user.name "$(git log -n 1 --pretty=format:%an)" + git config user.email "$(git log -n 1 --pretty=format:%ae)" diff --git a/.github/actions/git/push-changes/action.yml b/.github/actions/git/push-changes/action.yml index 31ddd3f2..5c728462 100644 --- a/.github/actions/git/push-changes/action.yml +++ b/.github/actions/git/push-changes/action.yml @@ -87,12 +87,14 @@ runs: set -e working-directory: ${{ inputs.working-directory }} + - name: Configure git identity + if: ${{ fromJSON(steps.validate.outputs.has-changes) == '1' }} + uses: './.github/actions/git/configure-identity' + - name: Push changes to ${{ github.head_ref || github.ref }} if: ${{ fromJSON(steps.validate.outputs.has-changes) == '1' }} shell: bash run: | - git config user.name "$(git log -n 1 --pretty=format:%an)" - git config user.email "$(git log -n 1 --pretty=format:%ae)" git commit -m '${{ inputs.commit-message }}' git pull --rebase origin ${{ github.head_ref || github.ref }} git push diff --git a/.github/actions/github/create-release/action.yml b/.github/actions/github/create-release/action.yml index 9dbb9c84..3ded70f2 100644 --- a/.github/actions/github/create-release/action.yml +++ b/.github/actions/github/create-release/action.yml @@ -26,10 +26,7 @@ runs: echo "notes-start-tag-argument=${{ inputs.notes-start-tag != '' && format('--notes-start-tag {0}', inputs.notes-start-tag) || '' }}" shell: bash - name: 'Configure git identity' - shell: bash - run: | - git config user.name "$(git log -n 1 --pretty=format:%an)" - git config user.email "$(git log -n 1 --pretty=format:%ae)" + uses: './.github/actions/git/configure-identity' - name: 'Create git tag ${{ inputs.release-version }}' shell: bash run: | diff --git a/.github/workflows/backtrack.yml b/.github/workflows/backtrack.yml index 82f5483b..9149061f 100644 --- a/.github/workflows/backtrack.yml +++ b/.github/workflows/backtrack.yml @@ -30,9 +30,7 @@ jobs: token: ${{ secrets.GH_ADMIN_TOKEN }} - name: 'Configure git' - run: | - git config user.name "$(git log -n 1 --pretty=format:%an)" - git config user.email "$(git log -n 1 --pretty=format:%ae)" + uses: './.github/actions/git/configure-identity' - name: 'Resolve backtrack targets' id: targets diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 6f79680c..2abd97ba 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -113,9 +113,7 @@ jobs: dotnet-version: ${{ env.dotnet-sdk-version }} - name: 'Configure git' - run: | - git config user.name "$(git log -n 1 --pretty=format:%an)" - git config user.email "$(git log -n 1 --pretty=format:%ae)" + uses: './.github/actions/git/configure-identity' - name: 'Create develop branch from main' run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8997287..c9df3e77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -358,11 +358,13 @@ jobs: echo "support-branch-exists=false" >> $GITHUB_OUTPUT fi + - name: 'Configure git identity' + if: ${{ steps.check-support-branch.outputs.support-branch-exists == 'false' }} + uses: './.github/actions/git/configure-identity' + - name: 'Create support branch' if: ${{ steps.check-support-branch.outputs.support-branch-exists == 'false' }} run: | - git config user.name "$(git log -n 1 --pretty=format:%an)" - git config user.email "$(git log -n 1 --pretty=format:%ae)" git checkout -b "${{ steps.resolve-support-branch.outputs.support-branch }}" git push --set-upstream origin "${{ steps.resolve-support-branch.outputs.support-branch }}" From f5569d93e454a0b2a8af51ae2b38662577dc8fc7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 16:44:50 +0000 Subject: [PATCH 3/3] ci: add develop/** branch trigger to pull-request workflow Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/04ca3c24-1251-41b5-8421-0822cde95f54 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com> --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 29392ddf..4f8917b0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -8,8 +8,9 @@ on: - synchronize - reopened branches: + - 'develop/**' - 'preview/**' - - 'release/**' + - 'release/**' permissions: actions: read