From fb2122552c12ad4dd4ef6f985727a3c11d2edf4b Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Mon, 19 Oct 2026 09:59:28 -0600 Subject: [PATCH 1/3] Enable App CI for staging PRs --- .github/workflows/bunTests.yml | 3 ++- .../checkContributorPlusChecklistHeading.yml | 3 ++- .github/workflows/checkSVGCompression.yml | 4 ++-- .github/workflows/cloudflareWorkerTests.yml | 4 ++-- .github/workflows/cspell.yml | 3 ++- .github/workflows/knip.yml | 14 +++++++++----- .github/workflows/lint.yml | 4 ++-- .github/workflows/nativeDependencies.yml | 3 ++- .github/workflows/oxfmt.yml | 4 ++-- .github/workflows/react-compiler-compliance.yml | 4 ++-- .github/workflows/reassurePerformanceTests.yml | 16 ++++++++-------- .github/workflows/shellCheck.yml | 4 ++-- .github/workflows/test.yml | 6 +++--- .github/workflows/testSyncVersions.yml | 3 ++- .github/workflows/typecheck.yml | 14 +++++++++----- .github/workflows/unused-styles.yml | 4 ++-- .github/workflows/validateGithubActions.yml | 4 ++-- .github/workflows/verifyHybridApp.yml | 6 +++--- .github/workflows/verifyParserFiles.yml | 4 ++-- .github/workflows/verifyPodfile.yml | 4 ++-- .github/workflows/verifyPodfilePrebuilt.yml | 2 +- .github/workflows/verifySignedCommits.yml | 3 ++- 22 files changed, 65 insertions(+), 51 deletions(-) diff --git a/.github/workflows/bunTests.yml b/.github/workflows/bunTests.yml index 924a2fddd1e1..b9aec8318a6f 100644 --- a/.github/workflows/bunTests.yml +++ b/.github/workflows/bunTests.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - 'server/**' - 'src/**' @@ -30,6 +30,7 @@ concurrency: jobs: test: name: Bun tests + if: ${{ github.event_name != 'pull_request' || github.actor != 'os-botify[bot]' }} runs-on: blacksmith-8vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/checkContributorPlusChecklistHeading.yml b/.github/workflows/checkContributorPlusChecklistHeading.yml index 0bdd447f9db9..74033e40340e 100644 --- a/.github/workflows/checkContributorPlusChecklistHeading.yml +++ b/.github/workflows/checkContributorPlusChecklistHeading.yml @@ -3,7 +3,7 @@ name: Check Contributor+ checklist heading on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - 'contributingGuides/CONTRIBUTOR_PLUS_CHECKLIST.md' - 'scripts/checkContributorPlusChecklistHeading.sh' @@ -19,6 +19,7 @@ concurrency: jobs: check: name: Check Contributor+ checklist heading + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/checkSVGCompression.yml b/.github/workflows/checkSVGCompression.yml index baa9526fcc94..5a1ea43b1407 100644 --- a/.github/workflows/checkSVGCompression.yml +++ b/.github/workflows/checkSVGCompression.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['**.svg'] permissions: @@ -17,7 +17,7 @@ concurrency: jobs: compress-svg: name: Compress SVG check - if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/cloudflareWorkerTests.yml b/.github/workflows/cloudflareWorkerTests.yml index aff7d9d745ed..179e4e8d590a 100644 --- a/.github/workflows/cloudflareWorkerTests.yml +++ b/.github/workflows/cloudflareWorkerTests.yml @@ -3,7 +3,7 @@ name: Cloudflare Worker tests on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - 'web/cloudflare-worker/**' # The tests check its inline scripts against the CSP hashes. @@ -21,7 +21,7 @@ permissions: jobs: test: name: Cloudflare Worker tests - if: github.actor != 'OSBotify' + if: github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' runs-on: blacksmith-2vcpu-ubuntu-2404 defaults: run: diff --git a/.github/workflows/cspell.yml b/.github/workflows/cspell.yml index 67a9591f0176..e37564011574 100644 --- a/.github/workflows/cspell.yml +++ b/.github/workflows/cspell.yml @@ -3,10 +3,11 @@ name: Spell check on: pull_request: types: [opened, synchronize] - branches: [main] + branches: [main, staging] jobs: spellcheck: + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0 diff --git a/.github/workflows/knip.yml b/.github/workflows/knip.yml index 92fe004e6cb9..e876ff860e91 100644 --- a/.github/workflows/knip.yml +++ b/.github/workflows/knip.yml @@ -3,7 +3,7 @@ name: Knip check on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - '**.js' - '**.jsx' @@ -24,7 +24,11 @@ concurrency: jobs: knip-compare: name: Compare knip issues against main + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-2vcpu-ubuntu-2404 + env: + # The PR's target branch, so a PR into staging is not compared with main. + BASE_REF: ${{ github.base_ref || 'main' }} steps: - name: Checkout PR uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0 @@ -35,12 +39,12 @@ jobs: - name: Run knip on PR run: KNIP=true npx knip --reporter json --no-exit-code > /tmp/knip-pr.json - - name: Checkout main + - name: Checkout base branch run: | - git fetch origin main --no-tags --depth=1 - git checkout origin/main + git fetch origin "$BASE_REF" --no-tags --depth=1 + git checkout "origin/$BASE_REF" - - name: Run knip on main + - name: Run knip on base branch run: KNIP=true npx knip --reporter json --no-exit-code > /tmp/knip-main.json - name: Restore PR workspace diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 72cbf457423c..324dbc2e97ee 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: [ '**.js', @@ -30,7 +30,7 @@ concurrency: jobs: lint: name: ESLint check - if: ${{ github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push' }} + if: ${{ (github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} # A cold-cache run loads the full TypeScript program into every worker (~12GB each), plus any extra # tsconfig project a file is mapped to. 2 workers need more than the 32GB an 8vcpu runner has. runs-on: blacksmith-16vcpu-ubuntu-2404 diff --git a/.github/workflows/nativeDependencies.yml b/.github/workflows/nativeDependencies.yml index 9f34711c3445..1dfd88ae8c25 100644 --- a/.github/workflows/nativeDependencies.yml +++ b/.github/workflows/nativeDependencies.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - '.github/workflows/nativeDependencies.yml' - 'ios/Podfile' @@ -37,6 +37,7 @@ concurrency: jobs: nativeDependencies: name: Check for unused native dependencies + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/oxfmt.yml b/.github/workflows/oxfmt.yml index 93d5e4fbf335..9cc8c8a2c02a 100644 --- a/.github/workflows/oxfmt.yml +++ b/.github/workflows/oxfmt.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['**.js', '**.ts', '**.tsx', '**.json', '**.mjs', '**.cjs', '**.yml', '**.yaml', '.oxfmtrc.json', 'config/.editorconfig', '.watchmanconfig', '.imgbotconfig'] concurrency: @@ -14,7 +14,7 @@ concurrency: jobs: oxfmt: name: Oxfmt check - if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/react-compiler-compliance.yml b/.github/workflows/react-compiler-compliance.yml index 46b1db684387..6a7ae68a9361 100644 --- a/.github/workflows/react-compiler-compliance.yml +++ b/.github/workflows/react-compiler-compliance.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['**.ts', '**.tsx'] concurrency: @@ -13,7 +13,7 @@ concurrency: jobs: react-compiler-compliance: name: React Compiler Compliance - if: ${{ github.actor != 'OSBotify' }} + if: ${{ github.actor != 'OSBotify' && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-4vcpu-ubuntu-2404 steps: diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index 00af550c2fe2..71e516ed3590 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -3,7 +3,7 @@ name: Reassure Performance Tests on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] # Ordered: the last matching pattern wins. paths: - '**' @@ -64,7 +64,7 @@ concurrency: jobs: baseline-perf-tests: - if: ${{ github.actor != 'OSBotify' }} + if: ${{ github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' }} runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout @@ -91,7 +91,7 @@ jobs: # Before setupNode: the key hashes no lockfile, and not running setupNode is most of the saving. # Restore-only for the same reasons as the Jest transform cache below. - - name: Restore the baseline measured on main + - name: Restore the cached baseline id: restoreBaseline # v5.0.1 uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb @@ -107,9 +107,9 @@ jobs: CACHE_HIT: ${{ steps.restoreBaseline.outputs.cache-hit }} run: | if [[ "$CACHE_HIT" == "true" ]]; then - echo "::notice::Restored main's baseline for $BASELINE_SHA from the cache; not measuring it here." + echo "::notice::Restored the baseline for $BASELINE_SHA from the cache; not measuring it here." else - echo "::warning::No cached baseline for $BASELINE_SHA - measuring it in this job. Expected when the seed run on that commit has not finished or failed; otherwise seedJestPerfCache.yml has stopped writing the entry." + echo "::warning::No cached baseline for $BASELINE_SHA - measuring it in this job. Expected when the PR targets a branch other than main (seedJestPerfCache.yml only seeds main), or when the seed run on that commit has not finished or failed; otherwise seedJestPerfCache.yml has stopped writing the entry." fi - name: Check out the baseline commit @@ -119,7 +119,7 @@ jobs: BASELINE_SHA: ${{ steps.baselineCommit.outputs.sha }} run: | set -e - # That commit, not the tip of main: the tip moves mid-run, and measuring the two sides at + # That commit, not the tip of the base branch: the tip moves mid-run, and measuring the two sides at # different trees is the noise this comparison exists to detect. Only its source tree is # needed, and a reachable SHA can be fetched bare. git fetch origin "$BASELINE_SHA" --no-tags --depth=1 @@ -175,7 +175,7 @@ jobs: include-hidden-files: true branch-perf-tests: - if: ${{ github.actor != 'OSBotify' }} + if: ${{ github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' }} runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout @@ -231,7 +231,7 @@ jobs: include-hidden-files: true validate-perf-tests: - if: ${{ github.actor != 'OSBotify' }} + if: ${{ github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' }} runs-on: blacksmith-4vcpu-ubuntu-2404 needs: [baseline-perf-tests, branch-perf-tests] steps: diff --git a/.github/workflows/shellCheck.yml b/.github/workflows/shellCheck.yml index 871e5ab42124..1e7baf9673c9 100644 --- a/.github/workflows/shellCheck.yml +++ b/.github/workflows/shellCheck.yml @@ -4,12 +4,12 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['**.sh'] jobs: lint: - if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 163a97c69349..2e8c81e227db 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['**.js', '**.ts', '**.tsx', 'package.json', 'package-lock.json'] concurrency: @@ -13,7 +13,7 @@ concurrency: jobs: jest: - if: ${{ github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call' }} + if: ${{ (github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-8vcpu-ubuntu-2404 env: CI: true @@ -83,7 +83,7 @@ jobs: fail_ci_if_error: false storybookTests: - if: ${{ github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call' }} + if: ${{ (github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-4vcpu-ubuntu-2404 name: Storybook tests steps: diff --git a/.github/workflows/testSyncVersions.yml b/.github/workflows/testSyncVersions.yml index 07335e764427..445fe56d0377 100644 --- a/.github/workflows/testSyncVersions.yml +++ b/.github/workflows/testSyncVersions.yml @@ -6,7 +6,7 @@ name: Test syncVersions script on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['.github/scripts/syncVersions.sh', 'tests/tooling/SyncVersions.test.ts', '.github/workflows/testSyncVersions.yml'] concurrency: @@ -15,6 +15,7 @@ concurrency: jobs: testSyncVersions: + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-6vcpu-macos-latest steps: - name: Check out diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index dce010bd5bc2..c113ac5c96af 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['**.js', '**.ts', '**.tsx', 'package.json', 'package-lock.json', '**/tsconfig*.json'] concurrency: @@ -13,8 +13,12 @@ concurrency: jobs: typecheck: - if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-4vcpu-ubuntu-2404 + env: + # The PR's target branch, so a PR into staging is not compared with main. + # Reusable calls have no base ref, so they retain the existing main behavior. + BASE_REF: ${{ github.base_ref || 'main' }} steps: - uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0 @@ -27,14 +31,14 @@ jobs: - name: Check for new JavaScript files run: | - git fetch origin main --no-tags --depth=1 + git fetch origin "$BASE_REF" --no-tags --depth=1 # Explanation: # - comm is used to get the intersection between two bash arrays # - git diff is used to see the files that were added on this branch - # - gh pr view is used to list files touched by this PR. Git diff may give false positives if the branch isn't up-to-date with main + # - gh pr view is used to list files touched by this PR. Git diff may give false positives if the branch isn't up-to-date with the base branch # - wc counts the words in the result of the intersection - count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/*.js' '__mocks__/*.js' '.storybook/*.js' 'assets/*.js' 'config/*.js' 'jest/*.js' 'scripts/*.js' 'tests/*.js' '.github/libs/*.js' '.github/scripts/*.js' ':!src/libs/SearchParser/*.js' ':!config/babel/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l) + count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A "origin/$BASE_REF" HEAD -- 'src/*.js' '__mocks__/*.js' '.storybook/*.js' 'assets/*.js' 'config/*.js' 'jest/*.js' 'scripts/*.js' 'tests/*.js' '.github/libs/*.js' '.github/scripts/*.js' ':!src/libs/SearchParser/*.js' ':!config/babel/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l) if [ "$count_new_js" -gt "0" ]; then echo "ERROR: Found new JavaScript files in the project; use TypeScript instead." exit 1 diff --git a/.github/workflows/unused-styles.yml b/.github/workflows/unused-styles.yml index 03afa2affa95..24ece92b767d 100644 --- a/.github/workflows/unused-styles.yml +++ b/.github/workflows/unused-styles.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['src/**', '.github/workflows/unused-styles.yml', 'scripts/findUnusedStyles.ts'] concurrency: @@ -14,7 +14,7 @@ concurrency: jobs: check-unused-styles: name: Check for unused styles - if: ${{ github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'workflow_call' }} + if: ${{ (github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/validateGithubActions.yml b/.github/workflows/validateGithubActions.yml index 4d4f9b5ef9fa..2c9a612d6810 100644 --- a/.github/workflows/validateGithubActions.yml +++ b/.github/workflows/validateGithubActions.yml @@ -3,12 +3,12 @@ name: Validate Github Actions on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['.github/**', 'scripts/**', 'package.json', 'package-lock.json', '**/tsconfig*.json'] jobs: verify: - if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' + if: github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' && github.actor != 'imgbot[bot]' runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/verifyHybridApp.yml b/.github/workflows/verifyHybridApp.yml index 762f08d95427..fc59a6e15598 100644 --- a/.github/workflows/verifyHybridApp.yml +++ b/.github/workflows/verifyHybridApp.yml @@ -3,7 +3,7 @@ name: Verify HybridApp build on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - '**.kt' - '**.java' @@ -79,7 +79,7 @@ jobs: contents: read id-token: write pull-requests: write - if: ${{ !github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' && github.actor != 'os-botify[bot]' }} cache-mode: read uses: ./.github/workflows/buildAndroid.yml with: @@ -93,7 +93,7 @@ jobs: contents: read id-token: write pull-requests: write - if: ${{ !github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' && github.actor != 'os-botify[bot]' }} cache-mode: read uses: ./.github/workflows/buildIOS.yml with: diff --git a/.github/workflows/verifyParserFiles.yml b/.github/workflows/verifyParserFiles.yml index 08561d712ffb..ab559fdcfef6 100644 --- a/.github/workflows/verifyParserFiles.yml +++ b/.github/workflows/verifyParserFiles.yml @@ -3,13 +3,13 @@ name: Check consistency of search parser files on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - 'src/libs/SearchParser/**' jobs: verify: - if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' + if: github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' && github.actor != 'imgbot[bot]' runs-on: blacksmith-6vcpu-macos-latest steps: - name: Checkout diff --git a/.github/workflows/verifyPodfile.yml b/.github/workflows/verifyPodfile.yml index e806fa0b1317..882f72e9547a 100644 --- a/.github/workflows/verifyPodfile.yml +++ b/.github/workflows/verifyPodfile.yml @@ -3,7 +3,7 @@ name: Verify iOS native configuration on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - ios/** - 'package.json' @@ -15,7 +15,7 @@ on: jobs: verify: - if: github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' + if: github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' && github.actor != 'imgbot[bot]' runs-on: blacksmith-6vcpu-macos-latest steps: - name: Checkout diff --git a/.github/workflows/verifyPodfilePrebuilt.yml b/.github/workflows/verifyPodfilePrebuilt.yml index 4bc071adf0ac..f50181d441ca 100644 --- a/.github/workflows/verifyPodfilePrebuilt.yml +++ b/.github/workflows/verifyPodfilePrebuilt.yml @@ -6,7 +6,7 @@ name: Verify Podfile.lock uses prebuilt react-native on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: - 'ios/Podfile.lock' - '.github/scripts/verifyPodfilePrebuilt.sh' diff --git a/.github/workflows/verifySignedCommits.yml b/.github/workflows/verifySignedCommits.yml index 6f6b8d10559d..9fca71de5989 100644 --- a/.github/workflows/verifySignedCommits.yml +++ b/.github/workflows/verifySignedCommits.yml @@ -3,10 +3,11 @@ name: Verify signed commits on: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] jobs: verifySignedCommits: + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0 From de4935a090cc5e675cd8b73b6a96725f3808b049 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Fri, 23 Oct 2026 14:50:08 -0600 Subject: [PATCH 2/3] Enable remaining staging validation workflows --- .github/workflows/checkValidateCodeTerminology.yml | 3 ++- .github/workflows/validatePatches.yml | 10 +++++++--- scripts/validatePatches.sh | 7 ++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checkValidateCodeTerminology.yml b/.github/workflows/checkValidateCodeTerminology.yml index 5835bb2f06da..cd96336914ed 100644 --- a/.github/workflows/checkValidateCodeTerminology.yml +++ b/.github/workflows/checkValidateCodeTerminology.yml @@ -3,11 +3,12 @@ name: Check validateCode terminology on: pull_request: types: [opened, synchronize] - branches: [main] + branches: [main, staging] paths: ['**.ts', '**.tsx', '**.md'] jobs: check: + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout diff --git a/.github/workflows/validatePatches.yml b/.github/workflows/validatePatches.yml index 20f23630742f..e3d4757dc5fc 100644 --- a/.github/workflows/validatePatches.yml +++ b/.github/workflows/validatePatches.yml @@ -3,18 +3,22 @@ name: Validate Patches on: pull_request: types: [opened, synchronize] - branches: [main] + branches: [main, staging] paths: ['patches/**'] jobs: validate-patches: + if: github.actor != 'os-botify[bot]' runs-on: blacksmith-4vcpu-ubuntu-2404 + env: + # The PR's target branch, so a PR into staging is not compared with main. + BASE_REF: ${{ github.base_ref || 'main' }} steps: - name: Checkout uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0 - - name: Fetch main branch - run: git fetch origin --depth=1 main + - name: Fetch base branch + run: git fetch origin "$BASE_REF" --no-tags --depth=1 - name: Run patch validator run: ./scripts/validatePatches.sh diff --git a/scripts/validatePatches.sh b/scripts/validatePatches.sh index 6b98d53122a7..677c0debba1a 100755 --- a/scripts/validatePatches.sh +++ b/scripts/validatePatches.sh @@ -4,11 +4,12 @@ set -e ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" readonly ROOT_DIR readonly DETAILS_MD="details.md" +readonly BASE_REF="${BASE_REF:-main}" ERRORS=() -# Get list of modified patch files in PR (compared to main branch) -CHANGED_PATCHES=$(git diff --diff-filter=AMR --name-only origin/main | grep "^patches/.*\.patch$" || true) -REMOVED_PATCHES=$(git diff --diff-filter=D --name-only origin/main | grep "^patches/.*\.patch$" || true) +# Get list of modified patch files in PR (compared to the base branch) +CHANGED_PATCHES=$(git diff --diff-filter=AMR --name-only "origin/$BASE_REF" | grep "^patches/.*\.patch$" || true) +REMOVED_PATCHES=$(git diff --diff-filter=D --name-only "origin/$BASE_REF" | grep "^patches/.*\.patch$" || true) if [[ -z "$CHANGED_PATCHES" ]] && [[ -z "$REMOVED_PATCHES" ]]; then echo "✅ No modified or removed patch files." From 4725bbce7da6b9e1ff21ec71f9622fc09fbe39d1 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Thu, 29 Oct 2026 14:30:39 -0600 Subject: [PATCH 3/3] Run Oxlint on staging pull requests --- .github/workflows/oxlint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/oxlint.yml b/.github/workflows/oxlint.yml index 2de009114c09..6da63185241c 100644 --- a/.github/workflows/oxlint.yml +++ b/.github/workflows/oxlint.yml @@ -4,7 +4,7 @@ on: workflow_call: pull_request: types: [opened, synchronize] - branches-ignore: [staging, production] + branches-ignore: [production] paths: ['**.js', '**.ts', '**.tsx', '**.json', '**.mjs', '**.cjs', 'oxlint.config.mts', 'config/oxlint/**', 'scripts/lint/**', '.github/workflows/oxlint.yml'] concurrency: @@ -14,7 +14,7 @@ concurrency: jobs: oxlint: name: Oxlint check (non-blocking) - if: ${{ github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push' }} + if: ${{ (github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }} runs-on: blacksmith-8vcpu-ubuntu-2404 steps: - name: Checkout