This GitHub Action submits textlint review comments if there are violations.
Here is the sample repository I've set up the automation.
To set up the textlint, you need to
- set up textlint
- set up workflow
To set up textlint, we need package.json
, Dangerfile
and .textlintrc
. Here are the examples:
{
"name": "danger-textlint-actions-demo",
"version": "1.0.0",
"dependencies": {
"textlint": "^11.2.3",
"textlint-rule-preset-japanese": "^2.0.1"
}
}
textlint.max_severity = "warn"
textlint.lint
{
"filters": {},
"rules": {
"preset-japanese": true
}
}
An example workflow looks like this:
workflow "textlint" {
resolves = "danger"
on = "pull_request"
}
action "npm install" {
uses = "actions/npm@c555744"
args = "install"
}
action "danger" {
needs = ["npm install"]
uses = "yuichielectric/danger-textlint-actions@master"
secrets = ["GITHUB_TOKEN"]
}