https://github.com/rusinikita/changes-action
GitHub action to run changes check
https://github.com/rusinikita/changes-action
agreement diff git pull-request validation
Last synced: 3 months ago
JSON representation
GitHub action to run changes check
- Host: GitHub
- URL: https://github.com/rusinikita/changes-action
- Owner: rusinikita
- License: gpl-3.0
- Created: 2024-03-02T20:31:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-03T12:44:43.000Z (over 2 years ago)
- Last Synced: 2024-03-03T21:42:32.873Z (over 2 years ago)
- Topics: agreement, diff, git, pull-request, validation
- Language: Shell
- Homepage: https://rusinikita.github.io/changes
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# changes-action
GitHub action to run [changes check](https://rusinikita.github.io/changes/) for git style and diff validation.
```yaml
steps:
- uses: rusinikita/changes-action@v1
```

Action combines install script and other actions for fastest execution:
- Binary installation script
- Caching binary to skip installation in next runs
- Running `check` command
- Posting `check` result message in pull request
#### Full workflow
Create `.github/wokrflows/changes.yml` file and fill it with following content.
```yaml
name: changes verification
on:
pull_request:
permissions:
contents: read
pull-requests: write # important for message posting, removable
jobs:
lint:
name: changes-verification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# skip pull request merge commit, important if "no merge commits" validation enabled, removable
ref: ${{ github.event.pull_request.head.sha }}
# fetch all branches and commits, important for git diff retrieving
fetch-depth: 0
- uses: rusinikita/changes-action@v1
with:
version: v0.3.2 # version of changes cli, default latest
pr-message: true # enables message posting, default false
config: .changes.yaml # config file path, default is .changes.[yaml,yml,toml,json]
```
> [!NOTE]
> Using `latest` version slows action run a little.
> It enables network request for resolving latest release.
> Resolved version binary cashed until new release detected.