Skip to content

Commit

Permalink
Add checksNotification option (#21)
Browse files Browse the repository at this point in the history
* fix context

* dist

* changelog

* debug fork
  • Loading branch information
Zomzog committed Mar 20, 2021
1 parent a7ed85f commit 564f4aa
Show file tree
Hide file tree
Showing 13 changed files with 503 additions and 357 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
=== 1.2.0

Global upgrade of dependencies (github action, eslint, typescript...)

Change master to main in description and fix the version.

Fix context issue

Add checksNotification option

=== 1.1.0

Upgrade dependencies for CVE
Expand Down
13 changes: 12 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ image:https://snyk.io/test/github/Zomzog/changelog-checker/badge.svg?targetFile=
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 `checksNotification` 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:

Expand All @@ -27,10 +37,11 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Changelog check
uses: Zomzog/changelog-checker@v1.1.0
uses: Zomzog/changelog-checker@v1.2.0
with:
fileName: myChangelog.adoc # default `CHANGELOG.adoc`
noChangelogLabel: my custom label # default `no changelog`
checksNotification: Simple # default `Detailed`
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
----
Expand Down
1 change: 0 additions & 1 deletion __tests__/service/prService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {PR} from '../data.test'
import {GitHub} from '@actions/github/lib/utils'
import {Context} from '@actions/github/lib/context'
import { PrService } from "../../src/service/PrService";
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
noChangelogLabel:
description: 'Label to ignore changelog check'
default: 'no changelog'
checkNotification:
description: 'Simple or Detailed'
default: 'Detailed'
runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit 564f4aa

Please sign in to comment.