Skip to content

GitHub Action to run smelly-python and post summaries of present code smells to jobs and PRs

License

Notifications You must be signed in to change notification settings

smelly-python/smell-my-pr

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

GitHub Action to run smelly-python and post summaries of present code smells to jobs and PRs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •