Improve the quality and consistency of your documentation with EkLine, an automated review tool for your GitHub repositories. This action integrates seamlessly with your existing GitHub workflow, allowing you to maintain high-quality documentation easily.
inputs:
content_dir:
description: 'Content directories relative to the root. Specify a single path or multiple paths (one per line). Example:
content_dir: ./testData
content_dir: |
./testData
./testData2'
default: '.'
ek_token:
description: 'Token for EkLine application'
required: true
filter_mode:
description: |
Filtering mode for the EkLine reviewer command [added,diff_context,file,nofilter].
Default is added.
default: 'added'
github_token:
description: 'GITHUB_TOKEN'
default: '${{ secrets.github_token }}'
reporter:
description: 'Reporter of EkLine review command [github-pr-check,github-check,github-pr-review].'
default: 'github-pr-review'
ignore_rule:
description: 'Ignore the rules that are passed in as comma-separated values (eg: EK00001,EK00004). Use this flag to skip specific rules during the review process.'
default: ''
openapi_spec:
description: 'Path to OpenAPI specification file to review'
required: false
exclude_directories:
description: 'Directories to exclude from analysis. Specify a single path or multiple paths (one per line). Example:
exclude_directories: ./node_modules
exclude_directories: |
./node_modules
./dist'
default: ''
exclude_files:
description: 'Files to exclude from analysis. Specify a single file or multiple files (one per line). Example:
exclude_files: ./README.md
exclude_files: |
./README.md
./CHANGELOG.md'
default: ''
debug:
description: 'Enable debug mode to print all environment variables starting with INPUT_ when set to true.'
default: 'false'
name: EkLine
on:
push:
branches:
- master
- main
pull_request:
jobs:
test-pr-review:
if: github.event_name == 'pull_request'
name: runner / EkLine Reviewer (github-pr-review)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ekline-io/ekline-github-action@v6
with:
content_dir: ./src/docs
ek_token: ${{ secrets.ek_token }}
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
openapi_spec: './api/openapi.yaml'
ignore_rule: "EK00010,EK00003" # Optional
exclude_directories: | # Optional
./node_modules
./dist
exclude_files: | # Optional
./CHANGELOG.md
./LICENSE
EkLine reviewer can report results in review services as continuous integration.
github-pr-check reporter reports results to GitHub Checks.
It's basically same as reporter: github-pr-check
except it works not only for
Pull Request but also for commit.
github-pr-review reporter reports results to GitHub PullRequest review comments using GitHub Personal API Access Token. GitHub Enterprise is supported too.
- Go to https://github.com/settings/tokens and generate new API token.
- Check
repo
for private repositories orpublic_repo
for public repositories.
You can control how EkLine reviewer filter results by -filter-mode
flag.
Available filter modes are as below.
Filter results by added/modified lines.
Filter results by diff context. i.e. changed lines +-N lines (N=3 for example).
Filter results by added/modified file. i.e. EkLine reviewer will report results as long as they are in added/modified file even if the results are not in actual diff.
Do not filter any results. Useful for posting results as comments as much as possible and check other results in console at the same time.
Note that not all reporters provide full support of filter mode due to API limitation.
e.g. github-pr-review
reporter uses GitHub Review
API but it doesn't support posting comment outside diff (diff_context
),
so EkLine reviewer will use Check annotation as fallback to post those comments [1].
reporter \ filter-mode |
added |
diff_context |
file |
nofilter |
---|---|---|---|---|
github-check |
OK | OK | OK | OK |
github-pr-check |
OK | OK | OK | OK |
github-pr-review |
OK | OK | Partially Supported [1] | Partially Supported [1] |
- [1] Report results which is outside diff context with Check annotation as fallback if it's running in GitHub actions instead of Review API (comments). All results will be reported to console as well.
To ignore specific rules during the review process, you can use the ignore_rule
flag. This flag accepts a comma-separated list of rule identifiers that you wish to skip.
For example, if you want to ignore rules EK00001
, EK00004
and EK00005
, you can set the ignore_rule
flag in your configuration like this:
ignore_rule: "EK00001,EK00004,EK00005"