Skip to content

Smelly Python: Smell My PR

Actions
Post a summary of pylint report as a comment on PRs
v1.1.0
Latest
Star (3)

Smelly Python: Smell My PR

An action that runs smelly-python and post summaries of present code smells to jobs and to PRs. Smelly Python runs pylint to check code smells present in your code. This action then posts a job summary in the Actions tab and a comment on your PR (if you pushed to a branch that has an open PR).

smelly-python's PR comment

Workflow setup

Required input:

  • command: command that runs smelly-python on the module you want to analyse. We automatically install smelly-python using pipenv so you can use pipenv run smelly-python -d <module>.
  • github-token: ${{secrets.GITHUB_TOKEN}}

optional input:

  • install-pipenv (Default True): Installs pipenv before trying to install smelly-python. Only set this to False when you have manually installed pipenv earlier.

It is necessary to include the following permissions in your job. See the example of a workflow setup below.

permissions:
  checks: write
  pull-requests: write
  contents: read

Example:

jobs:
  linter:
    [...]
    permissions:
      checks: write
      pull-requests: write
      contents: read
    steps:
    - uses: actions/checkout@v3
    [...]
    - uses: smelly-python/smell-my-pr@main
      with: 
        github-token: ${{secrets.GITHUB_TOKEN}}
        command: pipenv run smelly-python -d src
        install-pipenv: true

Smelly Python: Smell My PR is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Post a summary of pylint report as a comment on PRs
v1.1.0
Latest

Smelly Python: Smell My PR is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.