Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions site/guide/_snippets/automating-non-blocking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ concurrency:

jobs:
pr-status:
# recommended: skip the release pull request, as it never has changesets
if: ${{ !startsWith(github.head_ref, 'changeset-release/') }}
runs-on: ubuntu-slim
permissions:
contents: read # to check out repo (actions/checkout)
Expand Down
4 changes: 3 additions & 1 deletion site/guide/automating.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ You can also use the `pull_request` event if you prefer to lock permissions down
```yaml
jobs:
pr-status:
if: github.event.pull_request.head.repo.full_name == github.repository
if: github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'changeset-release/')
# ...
```

:::

<<< ./_snippets/automating-non-blocking.yaml [.github/workflows/comment-changesets-pr-status.yml]

The `if` condition on the `pr-status` job skips the release pull request opened by the Changesets GitHub Action, which never has changesets.

Both approaches comment on PRs of whether changesets are present and gives you link to add your own changeset as a maintainer to smooth over merging pull requests without waiting for the contributor to add a changeset.

### Blocking
Expand Down