Skip to content

Commit 9afb12c

Browse files
rtpascualsobolk
authored andcommitted
feed pr base sha and ref into envs before scripts (#2168)
* feed pr base sha and ref into envs before scripts * removing empty file
1 parent 46ad049 commit 9afb12c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.changeset/spicy-rules-speak.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.github/workflows/health_checks.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,9 @@ jobs:
411411
- uses: ./.github/actions/setup_node
412412
- uses: ./.github/actions/restore_install_cache
413413
- run: git fetch origin
414-
- run: npm run diff:check ${{ github.event.pull_request.base.sha }}
414+
- run: npm run diff:check "$BASE_SHA"
415+
env:
416+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
415417
check_pr_changesets:
416418
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'github-actions[bot]'
417419
runs-on: ubuntu-latest
@@ -425,9 +427,13 @@ jobs:
425427
- uses: ./.github/actions/setup_node
426428
- uses: ./.github/actions/restore_install_cache
427429
- name: Validate that PR has changeset
428-
run: npx changeset status --since origin/${{ github.event.pull_request.base.ref }}
430+
run: npx changeset status --since origin/"$BASE_REF"
431+
env:
432+
BASE_REF: ${{ github.event.pull_request.base.ref }}
429433
- name: Validate changeset is not missing packages
430-
run: npx tsx scripts/check_changeset_completeness.ts ${{ github.event.pull_request.base.sha }}
434+
run: npx tsx scripts/check_changeset_completeness.ts "$BASE_SHA"
435+
env:
436+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
431437
- name: Validate that changeset has necessary dependency updates
432438
run: |
433439
npx changeset version

0 commit comments

Comments
 (0)