GitHub Action
EkLine (GitHub Action)
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 directory relative to the root directory.'
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-check'
ignore_rule:
description: 'Ignore the rules that are passed in as comma seperated values (eg: EK00001,EK00004). Use this flag to skip specific rules during the review process.'
default: ''
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@v5
with:
content_dir: ./src/docs
ek_token: ${{ secrets.ek_token }}
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
ignore_rule: "EK00010,EK00003" # Optional
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
and EK00004
, you can set the ignore_rule
flag in your configuration like this:
ignore_rule: "EK00001,EK00004"