diff --git a/.github/workflows/copyright-update.yml b/.github/workflows/copyright-update.yml index e320df6a8fd4..b5b33c37bd9b 100644 --- a/.github/workflows/copyright-update.yml +++ b/.github/workflows/copyright-update.yml @@ -18,6 +18,7 @@ name: Copyright Update on: + pull_request: schedule: - cron: '0 0 31 12 *' # Repeats December 31st every year @@ -41,9 +42,11 @@ jobs: fetch-depth: 0 # Update the copyright headers - name: Find and Replace + # CURRENT_YEAR=$(date +'%Y') + # NEW_YEAR=$(($CURRENT_YEAR + 1)) run: | - CURRENT_YEAR=$(date +'%Y') - NEW_YEAR=$(($CURRENT_YEAR + 1)) + NEW_YEAR=$(date +'%Y') + CURRENT_YEAR=$(($NEW_YEAR - 1)) grep -rlZE "Copyright ([0-9]+)-$CURRENT_YEAR" . | xargs -0 sed -i -E "s/Copyright ([0-9]+)-$CURRENT_YEAR/Copyright \1-$NEW_YEAR/g" # Create PR - name: Create Pull Request diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1ccf61335d12..8c09a0f1c8e2 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,5 +1,5 @@ # -# Copyright 2013-2023 the original author or authors from the JHipster project. +# Copyright the original author or authors from the JHipster project. # # This file is part of the JHipster project, see https://www.jhipster.tech/ # for more information.