Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
ekline-io

GitHub Action

EkLine (GitHub Action)

v6.0.0

EkLine (GitHub Action)

ekline-io

EkLine (GitHub Action)

📝 Optimize and improve your documentation website

Installation

Copy and paste the following snippet into your .yml file.

              

- name: EkLine (GitHub Action)

uses: ekline-io/ekline-github-action@v6.0.0

Learn more about this action in ekline-io/ekline-github-action

Choose a version

EkLine GitHub action

Test release GitHub release (latest SemVer) release

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.

Input

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: ''

Usage

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

Reporters

EkLine reviewer can report results in review services as continuous integration.

Reporter: GitHub Checks (reporter: github-pr-check)

github-pr-check reporter reports results to GitHub Checks.

Reporter: GitHub Checks (reporter: github-check)

It's basically same as reporter: github-pr-check except it works not only for Pull Request but also for commit.

Reporter: GitHub PullRequest review comment (reporter: github-pr-review)

sample-github-pr-review.png

github-pr-review reporter reports results to GitHub PullRequest review comments using GitHub Personal API Access Token. GitHub Enterprise is supported too.

Filter mode

You can control how EkLine reviewer filter results by -filter-mode flag. Available filter modes are as below.

added (default)

Filter results by added/modified lines.

diff_context

Filter results by diff context. i.e. changed lines +-N lines (N=3 for example).

file

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.

nofilter

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.

Filter Mode Support Table

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.

Ignoring Specific Rules

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"