From 6e4b0ceeab37e57124597244761cc9a86905463a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 5 Jan 2026 10:57:02 +0000 Subject: [PATCH 1/9] Initial plan From c90ecd6f80b2b6b5d4cbc1d6ff3b6839d7a4b8b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 5 Jan 2026 11:00:35 +0000 Subject: [PATCH 2/9] fix: update copyright workflow to use GitHub Actions environment variables instead of shell substitution Co-authored-by: peterInTown <161608740+peterInTown@users.noreply.github.com> --- .github/workflows/update-copyright.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index 9042bf82b8..e1e7a6cb0f 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -20,6 +20,9 @@ jobs: uses: actions/checkout@v6 with: token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set current year + run: echo "YEAR=$(date +%Y)" >> $GITHUB_ENV - name: Run copyright update script run: | @@ -41,17 +44,17 @@ jobs: uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "chore: update copyright year to $(date +%Y)" - title: "chore: update copyright year to $(date +%Y)" + commit-message: "chore: update copyright year to ${{ env.YEAR }}" + title: "chore: update copyright year to ${{ env.YEAR }}" body: | - This PR updates the copyright year in all source files from 2018 to $(date +%Y). + This PR updates the copyright year in all source files from 2018 to ${{ env.YEAR }}. Changes: - Updated copyright headers in all .kt, .java, and .sh files - Updated copyright template file This is an automated update triggered by the scheduled workflow. - branch: copyright-year-update-$(date +%Y) + branch: copyright-year-update-${{ env.YEAR }} delete-branch: true - name: Output result From 30a9c6321d086a7b33e2cab2743a6efdca5afe55 Mon Sep 17 00:00:00 2001 From: Richard Sutherland Date: Tue, 6 Jan 2026 09:45:40 +0000 Subject: [PATCH 3/9] [NOJIRA] fix: correct date format in copyright update workflow --- .github/workflows/update-copyright.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index e1e7a6cb0f..b019690c5b 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -20,9 +20,9 @@ jobs: uses: actions/checkout@v6 with: token: ${{ secrets.GITHUB_TOKEN }} - + - name: Set current year - run: echo "YEAR=$(date +%Y)" >> $GITHUB_ENV + run: echo "YEAR=$(date +'%Y')" >> $GITHUB_ENV - name: Run copyright update script run: | @@ -63,4 +63,4 @@ jobs: echo "Copyright year has been updated and a PR has been created" else echo "Copyright year is already current, no action needed" - fi \ No newline at end of file + fi From ca92158985d7613ec6b7e7ca8096ebec156d921e Mon Sep 17 00:00:00 2001 From: Richard Sutherland Date: Tue, 6 Jan 2026 10:05:28 +0000 Subject: [PATCH 4/9] [NOJIRA] fix: update copyright workflow to use outputs for current year --- .github/workflows/update-copyright.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index b019690c5b..2cbbad3314 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -22,9 +22,12 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Set current year - run: echo "YEAR=$(date +'%Y')" >> $GITHUB_ENV + id: date + run: echo "year=$(date +'%Y')" >> $GITHUB_OUTPUT - name: Run copyright update script + env: + YEAR: ${{ steps.date.outputs.year }} run: | ./scripts/update-copyright-year.sh @@ -44,17 +47,17 @@ jobs: uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "chore: update copyright year to ${{ env.YEAR }}" - title: "chore: update copyright year to ${{ env.YEAR }}" + commit-message: "chore: update copyright year to ${{ steps.date.outputs.year }}" + title: "chore: update copyright year to ${{ steps.date.outputs.year }}" body: | - This PR updates the copyright year in all source files from 2018 to ${{ env.YEAR }}. + This PR updates the copyright year in all source files from 2018 to ${{ steps.date.outputs.year }}. Changes: - Updated copyright headers in all .kt, .java, and .sh files - Updated copyright template file This is an automated update triggered by the scheduled workflow. - branch: copyright-year-update-${{ env.YEAR }} + branch: copyright-year-update-${{ steps.date.outputs.year }} delete-branch: true - name: Output result From 266266cdaaf74bfda1f9b7bffd3ff0e28b0ff324 Mon Sep 17 00:00:00 2001 From: Richard Sutherland Date: Tue, 6 Jan 2026 10:21:37 +0000 Subject: [PATCH 5/9] [NOJIRA] fix: refactor copyright update workflow to use GitHub CLI for branch creation and PR handling --- .github/workflows/update-copyright.yml | 48 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index 2cbbad3314..878e9d793b 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -44,21 +44,39 @@ jobs: - name: Create Pull Request if: steps.changes.outputs.changes == 'true' - uses: peter-evans/create-pull-request@v8 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "chore: update copyright year to ${{ steps.date.outputs.year }}" - title: "chore: update copyright year to ${{ steps.date.outputs.year }}" - body: | - This PR updates the copyright year in all source files from 2018 to ${{ steps.date.outputs.year }}. - - Changes: - - Updated copyright headers in all .kt, .java, and .sh files - - Updated copyright template file - - This is an automated update triggered by the scheduled workflow. - branch: copyright-year-update-${{ steps.date.outputs.year }} - delete-branch: true + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + YEAR: ${{ steps.date.outputs.year }} + BASE_BRANCH: ${{ github.ref_name }} + run: | + # Configure git as the actions bot + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + BRANCH_NAME="copyright-year-update-${YEAR}" + + # Create branch, commit, and push + git checkout -b "$BRANCH_NAME" + git add . + git commit -m "chore: update copyright year to ${YEAR}" + git push origin "$BRANCH_NAME" --force + + # Create PR using GitHub CLI checks if one exists first to prevent errors + if gh pr list --head "$BRANCH_NAME" --state open | grep -q "$BRANCH_NAME"; then + echo "PR already exists, branch updated." + else + gh pr create \ + --title "chore: update copyright year to ${YEAR}" \ + --body "This PR updates the copyright year in all source files from 2018 to ${YEAR}. + + Changes: + - Updated copyright headers in all .kt, .java, and .sh files + - Updated copyright template file + + This is an automated update triggered by the scheduled workflow." \ + --base "$BASE_BRANCH" \ + --head "$BRANCH_NAME" + fi - name: Output result run: | From 913cb0fffe483814d2ff66d0a2e9dd6610baf894 Mon Sep 17 00:00:00 2001 From: Richard Sutherland Date: Tue, 6 Jan 2026 11:20:15 +0000 Subject: [PATCH 6/9] [NOJIRA] fix: update copyright workflow to use GitHub Actions for PR creation and app token management --- .github/workflows/update-copyright.yml | 55 ++++++++++---------------- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index 878e9d793b..070f748d75 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -13,9 +13,15 @@ permissions: jobs: update-copyright: - runs-on: ubuntu-latest - + runs-on: ubuntu-24.04-16cores-public + steps: + - uses: actions/create-github-app-token@v2 + id: app-token + with: + app-id: ${{ vars.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} + - name: Checkout repository uses: actions/checkout@v6 with: @@ -43,40 +49,21 @@ jobs: fi - name: Create Pull Request - if: steps.changes.outputs.changes == 'true' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - YEAR: ${{ steps.date.outputs.year }} - BASE_BRANCH: ${{ github.ref_name }} - run: | - # Configure git as the actions bot - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - BRANCH_NAME="copyright-year-update-${YEAR}" - - # Create branch, commit, and push - git checkout -b "$BRANCH_NAME" - git add . - git commit -m "chore: update copyright year to ${YEAR}" - git push origin "$BRANCH_NAME" --force - - # Create PR using GitHub CLI checks if one exists first to prevent errors - if gh pr list --head "$BRANCH_NAME" --state open | grep -q "$BRANCH_NAME"; then - echo "PR already exists, branch updated." - else - gh pr create \ - --title "chore: update copyright year to ${YEAR}" \ - --body "This PR updates the copyright year in all source files from 2018 to ${YEAR}. + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ steps.app-token.outputs.token }} + commit-message: "chore: update copyright year to ${{ steps.date.outputs.year }}" + title: "chore: update copyright year to ${{ steps.date.outputs.year }}" + body: | + This PR updates the copyright year in all source files from 2018 to ${{ steps.date.outputs.year }}. - Changes: - - Updated copyright headers in all .kt, .java, and .sh files - - Updated copyright template file + Changes: + - Updated copyright headers in all .kt, .java, and .sh files + - Updated copyright template file - This is an automated update triggered by the scheduled workflow." \ - --base "$BASE_BRANCH" \ - --head "$BRANCH_NAME" - fi + This is an automated update triggered by the scheduled workflow. + branch: copyright-year-update-${{ steps.date.outputs.year }} + delete-branch: true - name: Output result run: | From cf16b051f88a8ba79bbc174c42e6efd3684b50cd Mon Sep 17 00:00:00 2001 From: Richard Sutherland Date: Tue, 6 Jan 2026 13:36:24 +0000 Subject: [PATCH 7/9] [NOJIRA] fix: add skip-changelog label to copyright update workflow for automated PRs --- .github/workflows/update-copyright.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index 070f748d75..8ae973fefb 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -63,6 +63,7 @@ jobs: This is an automated update triggered by the scheduled workflow. branch: copyright-year-update-${{ steps.date.outputs.year }} + labels: skip-changelog delete-branch: true - name: Output result From 2819acde05c3f5a0e1b215b8a87f06f40d5cce60 Mon Sep 17 00:00:00 2001 From: Richard Sutherland Date: Tue, 6 Jan 2026 14:46:23 +0000 Subject: [PATCH 8/9] [NOJIRA] fix: update create-pull-request action to v8 and add conditional for changes --- .github/workflows/update-copyright.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index 8ae973fefb..189614fa0d 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -49,7 +49,8 @@ jobs: fi - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + if: steps.changes.outputs.changes == 'true' + uses: peter-evans/create-pull-request@v8 with: token: ${{ steps.app-token.outputs.token }} commit-message: "chore: update copyright year to ${{ steps.date.outputs.year }}" From 185c7f66df4691be53784ae72f326dc7116f5350 Mon Sep 17 00:00:00 2001 From: Richard Sutherland Date: Tue, 6 Jan 2026 16:12:55 +0000 Subject: [PATCH 9/9] [NOJIRA] fix: update copyright workflow to use app token output for repository checkout --- .github/workflows/update-copyright.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml index 189614fa0d..845133f005 100644 --- a/.github/workflows/update-copyright.yml +++ b/.github/workflows/update-copyright.yml @@ -25,12 +25,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ steps.app-token.outputs.token }} - name: Set current year id: date run: echo "year=$(date +'%Y')" >> $GITHUB_OUTPUT - + - name: Run copyright update script env: YEAR: ${{ steps.date.outputs.year }}