From 309af3360a2a2e9d832e37301f12ed72b1710ba1 Mon Sep 17 00:00:00 2001 From: akin2662 <162997666+akin2662@users.noreply.github.com> Date: Wed, 2 Apr 2025 03:24:49 -0400 Subject: [PATCH 1/2] Added PR audit workflow --- .github/workflows/pr_audit.yml | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/pr_audit.yml diff --git a/.github/workflows/pr_audit.yml b/.github/workflows/pr_audit.yml new file mode 100644 index 0000000..a912153 --- /dev/null +++ b/.github/workflows/pr_audit.yml @@ -0,0 +1,37 @@ +name: PR Audit + +on: [pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Check code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install tools + run: | + pip install flake8 black isort reviewdog + + - name: Run flake8 for linting + uses: reviewdog/action-flake8@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN}} + reporter: github-pr-review + level: warning + fail_on_error: true + filter_mode: diff_context + + - name: Run Black + run: black . --check + + - name: Run isort + run: isort . --check-only + + From 1d2c3e82453f75bcff3399fc4b5bb938cdd9f84f Mon Sep 17 00:00:00 2001 From: akin2662 <162997666+akin2662@users.noreply.github.com> Date: Wed, 2 Apr 2025 03:27:57 -0400 Subject: [PATCH 2/2] Added the test file for PR workflow --- test_file.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 test_file.py diff --git a/test_file.py b/test_file.py new file mode 100644 index 0000000..c9500dc --- /dev/null +++ b/test_file.py @@ -0,0 +1 @@ +def func():\n print( 'Hello' )