Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/gold-geese-gaze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cicd-changesets-check": minor
---

Initial version of changesets-check action
20 changes: 20 additions & 0 deletions actions/cicd-changesets-check/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MIT License

Copyright (c) 2019 changesets contributors Copyright (c) 2025 Smartcontractkit

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
48 changes: 48 additions & 0 deletions actions/cicd-changesets-check/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# cicd-changesets-check

Comments on PRs with whether a PR has a changeset or not and links to
documentation explaining to contributors how to create a changeset.

Based on [changesets/check-action](https://github.com/changesets/check-action)
(MIT, © changesets contributors).

## Usage

```yaml
name: Changeset Check

on: pull_request

jobs:
check:
name: Changeset Check
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Check for changeset
uses: smartcontractkit/.github/actions/cicd-changesets-check@<version>
with:
token: ${{ github.token }}
```

## Inputs

| Name | Description | Required | Default |
| ----------------- | ----------------------------------------------- | -------- | --------------------- |
| `token` | GitHub token for API access | Yes | `${{ github.token }}` |
| `fail-on-missing` | Fail the workflow if no changeset is found | No | `"true"` |
| `show-add-link` | Show the 'add a changeset' link for maintainers | No | `"true"` |

## Outputs

| Name | Description |
| --------------- | ------------------------------------------- |
| `has-changeset` | Whether the PR has a changeset (true/false) |

## Development

1. Update dist: `pnpm nx run cicd-changesets-check:build`
2. Run tests: `pnpm nx run cicd-changesets-check:test`
26 changes: 26 additions & 0 deletions actions/cicd-changesets-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: cicd-changesets-check
description: >
Comments on PRs with whether a PR has a changeset or not and links to
documentation explaining to contributors how to create a changeset.

inputs:
token:
description: "GitHub token for API access"
required: true
default: ${{ github.token }}
fail-on-missing:
description: "Fail the workflow if no changeset is found"
required: false
default: "true"
show-add-link:
description: "Show the 'add a changeset' link for maintainers"
required: false
default: "true"

outputs:
has-changeset:
description: "Whether the PR has a changeset (true/false)"

runs:
using: "node24"
main: "dist/index.js"
Loading
Loading