Need help for merge request

Requirement is --> While merging from one branch (dev) to other branch (release), we certainly want to do basic code quality checks with the help of Pylint. We need to automate these pylint checks, once Pull request (PR) is raised for the reviewer.So that once pylint checks are passed then, it will trigger a Jenkins build for further processing. Please let me know how to configure in github for the above requirement?

I find two actions for pylint from GitHub Marketplace, you can try using these actions in your workflow to do pylint check.

GitHub Action for pylint

Python Code Quality and Lint

You can create a workflow for Pull request event, and setup two jobs in this workflow.

  • The first job is used to run pylint checks via using the action for pylint.
  • The second job is used to run build and other further processes. On the second job, you can configure some conditions to skip current job according to the result of pylint check on first job.

Related docs as reference: