Skip to content

Commit 269d35c

Browse files
committed
📝 Updates documentation
1 parent 61cba4b commit 269d35c

File tree

1 file changed

+38
-90
lines changed

1 file changed

+38
-90
lines changed

README.md

Lines changed: 38 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,96 @@
1-
# Reviewdog/action-remark-lint GitHub Action
1+
# Action-remark-lint GitHub Action
22

3-
[![Test](https://github.com/reviewdog/action-remark-lint/workflows/Test/badge.svg)](https://github.com/reviewdog/action-remark-lint/actions?query=workflow%3ATest)
4-
[![reviewdog](https://github.com/reviewdog/action-remark-lint/workflows/reviewdog/badge.svg)](https://github.com/reviewdog/action-remark-lint/actions?query=workflow%3Areviewdog)
5-
[![depup](https://github.com/reviewdog/action-remark-lint/workflows/depup/badge.svg)](https://github.com/reviewdog/action-remark-lint/actions?query=workflow%3Adepup)
6-
[![release](https://github.com/reviewdog/action-remark-lint/workflows/release/badge.svg)](https://github.com/reviewdog/action-remark-lint/actions?query=workflow%3Arelease)
7-
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-remark-lint?logo=github\&sort=semver)](https://github.com/reviewdog/action-remark-lint/releases)
3+
[![Test](https://github.com/rickstaa/action-remark-lint/workflows/Test/badge.svg)](https://github.com/rickstaa/action-remark-lint/actions?query=workflow%3ATest)
4+
[![release](https://github.com/rickstaa/action-remark-lint/workflows/release/badge.svg)](https://github.com/rickstaa/action-remark-lint/actions?query=workflow%3Arelease)
5+
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/rickstaa/action-remark-lint?logo=github\&sort=semver)](https://github.com/rickstaa/action-remark-lint/releases)
86
[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github\&link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)
97

10-
![action screenshot](https://user-images.githubusercontent.com/17570430/102060312-4ee5e000-3df2-11eb-8c82-767afeccd8db.png)
11-
![action screenshot](https://user-images.githubusercontent.com/17570430/102059912-d3842e80-3df1-11eb-9b0a-2e04eab5e294.png)
12-
13-
This action runs [remark-lint](https://github.com/remarkjs/remark-lint) with [reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve code review experience. It can be used to format your code and/or annotate possible changes that would be made during this formatting.
8+
This action runs the [remark-lint linter](https://github.com/remarkjs/remark-lint) to check/format your markdown code on a push or pull request.
149

1510
## Quickstart
1611

1712
```yml
18-
name: reviewdog
19-
on: [pull_request]
13+
name: remark-lint-action
14+
on: [push, pull_request]
2015
jobs:
2116
remark-lint:
2217
name: runner / remark-lint
2318
runs-on: ubuntu-latest
2419
steps:
2520
- uses: actions/checkout@v1
2621
- name: remark-lint
27-
uses: reviewdog/action-remark-lint@v1
28-
with:
29-
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
reporter: github-pr-check # Change reporter. (Only `github-pr-check` is supported at the moment).
22+
uses: rickstaa/action-remark-lint@v1
3123
```
3224
33-
See the Inputs section below for details on the defaults and optional configuration settings.
34-
3525
## Inputs
3626
37-
### `github_token`
38-
39-
**Required**. Must be in form of `github_token: ${{ secrets.github_token }}`'.
40-
41-
### `workdir`
42-
43-
**Optional**. The directory to run remark-lint in. Defaults to `.`.
44-
45-
### `format`
46-
47-
**Optional**. If true, remark-lint format files and commit are creatable (use other Action). Defaults to `false`.
48-
49-
#### `fail_on_error`
50-
51-
**Optional**. Exit code for when remark-lint errors are found \[`true`, `false`]. Defaults to `false`. This is different than the remark-lint `--frail` argument, which specifies whether remark exits with an exit code of `1` if remark warnings are found.
52-
53-
#### `remark_flags`
54-
55-
**Optional**. Additional remark-lint flags. Defaults to `""`.
56-
57-
### `annotate`
27+
### `remark_args`
5828

59-
**Optional**. Annotate remark-lint changes using reviewdog. Defaults to `true`.
29+
**optional**: Remark-lint input arguments. Defaults to `. --frail --quiet`.
6030

61-
#### `tool_name`
31+
### `fail_on_error`
6232

63-
**Optional**. Tool name to use for reviewdog reporter. Defaults to `remark-lint`.
64-
65-
### `level`
66-
67-
**Optional**. Report level for reviewdog \[info, warning, error]. It's same as `-level` flag of reviewdog. Defaults to `error`.
68-
69-
### `reporter`
70-
71-
**Optional**. Reporter of reviewdog command \[github-pr-check, github-pr-review, github-check].
72-
Default is github-pr-check. github-pr-review can use Markdown and add a link to rule page in reviewdog reports.
73-
74-
### `filter_mode`
75-
76-
**Optional**. Filtering mode for the reviewdog command \[added, diff_context, file, nofilter]. Defaults to `"added"`.
77-
78-
### `reviewdog_flags`
79-
80-
**Optional**. Additional reviewdog flags. Defaults to `""`.
33+
**optional**: Exit code when remark-lint linting errors are found \[true, false]. Defaults to 'true'.
8134

8235
## Outputs
8336

8437
### `is_formatted`
8538

86-
Whether the files were formatted using the remark-lint linter.
39+
Boolean specifying whether any files were formatted using the remark-lint linter.
8740

88-
## Advance use cases
41+
## Advanced use cases
8942

90-
This action can be combined with [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) or [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) to also apply the annotated changes to the repository.
43+
### Annotate changes
9144

92-
### Commit changes
45+
This action can be combined with [reviewdog/action-suggester](https://github.com/reviewdog/action-suggester) also to annotate any possible changes (uses `git diff`).
9346

9447
```yaml
95-
name: reviewdog
96-
on: [pull_request]
48+
name: remark-lint-action
49+
on: [push, pull_request]
9750
jobs:
9851
name: runner / remark-lint
9952
runs-on: ubuntu-latest
10053
steps:
10154
- uses: actions/checkout@v2
55+
- name: Check files using the remark-lint linter
56+
uses: rickstaa/action-remark-lint@v1
57+
id: action_remark_lint
10258
with:
103-
ref: ${{ github.head_ref }}
104-
- name: Check files using remark-lint linter
105-
uses: reviewdog/action-remark-lint@v1
59+
remark_args: ". -o"
60+
- name: Annotate diff changes using reviewdog
61+
if: steps.action_remark_lint.outputs.is_formatted == 'true'
62+
uses: reviewdog/action-suggester@v1
10663
with:
107-
github_token: ${{ secrets.GITHUB_TOKEN }}
108-
reporter: github-check
109-
level: error
110-
fail_on_error: true
111-
format: true
112-
- name: Commit remark-lint formatting results
113-
if: failure()
114-
uses: stefanzweifel/git-auto-commit-action@v4
115-
with:
116-
commit_message: ":art: Format markdown code with remark-lint push"
64+
tool_name: remarkfmt
11765
```
11866

119-
### Create pull request
67+
### Commit changes or create a pull request
68+
69+
This action can be combined with [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) to also apply the annotated changes to the repository.
12070

12171
```yaml
122-
name: reviewdog
123-
on: [pull_request]
72+
name: remark-lint-action
73+
on: [push, pull_request]
12474
jobs:
12575
name: runner / remark-lint
12676
runs-on: ubuntu-latest
12777
steps:
12878
- uses: actions/checkout@v2
12979
- name: Check files using remark-lint linter
130-
uses: reviewdog/action-remark-lint@v1
80+
uses: rickstaa/action-remark-lint@v1
81+
id: action_remark_lint
13182
with:
132-
github_token: ${{ secrets.GITHUB_TOKEN }}
133-
reporter: github-check
134-
level: error
135-
fail_on_error: true
136-
format: true
83+
remark_args: ". -o"
13784
- name: Create Pull Request
138-
if: failure()
85+
if: steps.action_remark_lint.outputs.is_formatted == 'true'
13986
uses: peter-evans/create-pull-request@v3
14087
with:
14188
token: ${{ secrets.GITHUB_TOKEN }}
142-
title: "Format markdown code with remark-lint linter"
143-
commit-message: ":art: Format markdown code with remark-lint linter"
89+
title: "Format Python code with remark-lint linter"
90+
commit-message: ":art: Format Python code with remark-lint"
14491
body: |
14592
There appear to be some python formatting errors in ${{ github.sha }}. This pull request
14693
uses the [remark-lint](https://github.com/remarkjs/remark-lint) linter to fix these issues.
94+
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch
14795
branch: actions/remark-lint
14896
```

0 commit comments

Comments
 (0)