Skip to content

Ajout de ML pour détecter les G12 #125

Ajout de ML pour détecter les G12

Ajout de ML pour détecter les G12 #125

Workflow file for this run

name: PEP8 check
on: [pull_request_target]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Install deps'
run: |
pip install pylint
pip install -r requirements.pip
- name: 'Run PEP8'
id: run_pep8
run: |
echo "::set-output name=output::$(pylint **/*.py | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/%0A/g')"
pylint **/*.py
continue-on-error: true
- if: steps.run_pep8.outcome == 'failure'
name: 'Comment (failure)'
uses: actions/github-script@v3
env:
OUTPUT: ${{ steps.run_pep8.outputs.output }}
with:
script: |
const title = "Beep Beep! I found some formatting errors in this PR: \n"
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: title + ' \n``` \n' + process.env.OUTPUT + ' \n```'
})
- if: steps.run_pep8.outcome == 'success'
name: 'Comment (success)'
uses: actions/github-script@v3
with:
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Beep Beep! No formatting errors detected! :partying_face:'
})