Skip to content
git-pull-request

GitHub Action

Annotate Commit with Pylint Results

v1.0.1 Latest version

Annotate Commit with Pylint Results

git-pull-request

Annotate Commit with Pylint Results

Adds file annotations to a commit based on Pylint results

Installation

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

              

- name: Annotate Commit with Pylint Results

uses: karpikpl/[email protected]

Learn more about this action in karpikpl/pylint-annotation-action

Choose a version

Annotate code with pylint linting results

GitHub Super-Linter CI

GitHub Action that annotates code with pylint linting results captured using pylint *.py --output-format=json2:pylint.json.

Usage

Basic

You need to add permissions for this tool.

permissions:
  contents: read
  checks: write
uses: karpikpl/[email protected]
with:
  lint-file: pylint.json
  pylint-result-code: 0
  head-sha: abcd1234

Inputs

head-sha

Required SHA of the commit to annotate.

lint-file

Optional Linting JSON results file from Pylint. Defaults to pylint.json

pylint-result-code

Optional Pylint result code to consider as an error. Defaults to 0.

repo-owner

Optional Another repository owner, If not set, the current repository owner is used by default. Note that when you trying changing a repository, be aware that GITHUB_TOKEN should also have permission for that repository.

repo-name

Optional Another repository name. Of limited use on GitHub enterprise. If not set, the current repository is used by default. Note that when you trying changing a repository, be aware that GITHUB_TOKEN should also have permission for that repository.

repo-token

Optional, You can set PAT here. If not set, this will use ${{ github.token }}.

Outputs

result

The result of the action. Success, Failure or information message. Useful for debugging.