changelog-checker

Verify the changelog has been updated

MIT License

Stars
19
Committers
7

image:https://github.com/Zomzog/changelog-checker/workflows/build/badge.svg["build"] image:https://david-dm.org/Zomzog/changelog-checker.svg["david"] image:https://snyk.io/test/github/Zomzog/changelog-checker/badge.svg?targetFile=package.json["Known Vulnerabilities", link="https://snyk.io/test/github/Zomzog/changelog-checker?targetFile=package.json"]

=== Why

This action will check that the changelog file has been updated in the PR. It will add a check on the PR which can be required for blocking the merge.

The changelog file name can be customized with fileName parameter.

The check can be disabled for a PR with a label. This label can be customized with the noChangelogLabel parameter.

The checkNotification allows switching between Simple and Detailed checks. The simple check is based on the default check of the action. The detailed check will create a second check with a more precise message, but it required write access so it does not work with forks.

Detailed check fallback to simple for forks.

=== Usage:

[code, yaml]

name: MyLittleWorkflow
on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
- develop
jobs:
build:
name: Check Actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Changelog check
uses: Zomzog/[email protected]
with:
fileName: myChangelog.adoc # default CHANGELOG.adoc
noChangelogLabel: my custom label # default no changelog
checkNotification: Simple # default Detailed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

=== Develop

Install the dependencies
[code, bash]

$ npm install

Build the typescript and package it for distribution
[code, bash]

$ npm run build && npm run pack

Run the tests ✔️
[code, bash]

$ npm test

=== Publish to a distribution branch

Actions are run from GitHub repos so we will checkin the packed dist folder.

Then run
[code, bash]

$ npm run pack
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1

Your action is now published! 🚀

Package Rankings
Top 3.81% on Github actions
Related Projects