From 197e7e1792561f905382e67192f0032817e5464d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Wed, 15 Jul 2026 11:07:02 +0200 Subject: [PATCH 1/4] Restore automated BSL change date updates --- .github/workflows/license.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/license.yml diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 0000000000..c0564ae931 --- /dev/null +++ b/.github/workflows/license.yml @@ -0,0 +1,37 @@ +name: License +on: + schedule: + - cron: '0 0 1 1-12/3 *' # Run every three months + push: + branches: + - main + paths: + - .github/workflows/license.yml + workflow_dispatch: + +jobs: + update: + runs-on: ubuntu-latest + name: Update BSL change date + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + token: ${{ secrets.EXPO_BOT_PAT }} + - name: Check last commit date + run: | + # The date in the license + change_date=$(sed --quiet --regexp-extended 's/^Change Date:\s+([0-9]{4}-[0-9]{2}-[0-9]{2})/\1/p' < LICENSE-BUSL) + [ -z "$change_date" ] && exit 1 + + new_change_date=$(date --date "+3 years" --iso-8601) + + if [ "$(date --date "$new_change_date" +%s)" -gt "$(date --date "$change_date" +%s)" ]; then + sed --in-place "s/$change_date/$new_change_date/" LICENSE-BUSL + git config user.name 'Expo Bot' + git config user.email bot@expo.dev + git add LICENSE-BUSL + git commit -m "[license] Update BSL Change Date to $new_change_date" + if [ "$(git branch --show-current)" = main ]; then + git push + fi + fi From 59aebade45ebf277d03d4c46ed0613152f39d3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Wed, 15 Jul 2026 11:18:01 +0200 Subject: [PATCH 2/4] Run license workflow on pull requests --- .github/workflows/license.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index c0564ae931..c941ef6161 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -7,6 +7,9 @@ on: - main paths: - .github/workflows/license.yml + pull_request: + paths: + - .github/workflows/license.yml workflow_dispatch: jobs: From 1901230b360470855f2e4a78bd897ae42493c3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Wed, 15 Jul 2026 11:21:50 +0200 Subject: [PATCH 3/4] Verify bot token push access --- .github/workflows/license.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index c941ef6161..91b1d1bdca 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -20,6 +20,10 @@ jobs: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: token: ${{ secrets.EXPO_BOT_PAT }} + ref: ${{ github.head_ref || github.ref_name }} + - name: Verify Expo Bot token can push + if: github.event_name == 'pull_request' + run: git push origin "HEAD:refs/heads/$GITHUB_HEAD_REF" - name: Check last commit date run: | # The date in the license From 8e4e247d97a7962ea5960df57a1d6ccb0477c0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Wed, 15 Jul 2026 11:28:06 +0200 Subject: [PATCH 4/4] Remove unsafe pull request token check --- .github/workflows/license.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index 91b1d1bdca..c0564ae931 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -7,9 +7,6 @@ on: - main paths: - .github/workflows/license.yml - pull_request: - paths: - - .github/workflows/license.yml workflow_dispatch: jobs: @@ -20,10 +17,6 @@ jobs: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: token: ${{ secrets.EXPO_BOT_PAT }} - ref: ${{ github.head_ref || github.ref_name }} - - name: Verify Expo Bot token can push - if: github.event_name == 'pull_request' - run: git push origin "HEAD:refs/heads/$GITHUB_HEAD_REF" - name: Check last commit date run: | # The date in the license