Repository navigation
chore: release #366
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changesets PR Status | ||
|
Check warning on line 1 in .github/workflows/changesets-pr-status.yml
|
||
| # `pull_request_target` supports PRs from forks: no PR code is executed here | ||
| on: | ||
| pull_request_target: # zizmor: ignore[dangerous-triggers] | ||
| permissions: {} | ||
| concurrency: | ||
| group: '${{ github.workflow }}-${{ github.event.pull_request.number }}' | ||
| cancel-in-progress: true | ||
| jobs: | ||
| pr-status: | ||
| name: Generate PR status | ||
| # skip the release PR opened by `changesets/action`: it never has changesets | ||
| if: ${{ !startsWith(github.head_ref, 'changeset-release/') }} | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read # to check out repo (actions/checkout) | ||
| outputs: | ||
| comment-body: ${{ steps.pr-status.outputs.comment-body }} | ||
| steps: | ||
| # credentials are kept: `pr-status` fetches the PR head ref | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # zizmor: ignore[artipacked] | ||
| - name: Generate PR status | ||
| id: pr-status | ||
| uses: changesets/action/pr-status@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2 | ||
| pr-comment: | ||
| name: Comment on PR | ||
| needs: pr-status | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write # to create and update comments on PRs (changesets/action/pr-comment) | ||
| steps: | ||
| - name: Comment on PR | ||
| uses: changesets/action/pr-comment@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2 | ||
| with: | ||
| body: ${{ needs.pr-status.outputs.comment-body }} | ||