summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijayakumar A <36878324+kumvijaya@users.noreply.github.com>2024-08-26 23:36:22 +0530
committerGitHub <noreply@github.com>2024-08-26 23:36:22 +0530
commit36e79d360e74ff298c768482b058ea8986cd23a8 (patch)
tree202e417a6202fe33e7274407bc4b52c3a4d42ef6
parent24bf524ad7bd1f4165a7a02b118cfc152e28a5ae (diff)
downloadvyos-workflow-test-temp-36e79d360e74ff298c768482b058ea8986cd23a8.tar.gz
vyos-workflow-test-temp-36e79d360e74ff298c768482b058ea8986cd23a8.zip
T0000: check
-rw-r--r--.github/workflows/darker-lint.yml38
1 files changed, 35 insertions, 3 deletions
diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml
index 43ee5bf..c8a20c9 100644
--- a/.github/workflows/darker-lint.yml
+++ b/.github/workflows/darker-lint.yml
@@ -1,11 +1,14 @@
---
-name: Darker-Ruff Lint
+name: Darker Lint
on:
pull_request:
branches:
- current
+env:
+ base_ref: ${{ github.event.pull_request.base.ref }}
+
jobs:
darker-lint:
runs-on: ubuntu-latest
@@ -23,8 +26,37 @@ jobs:
- name: Fetch base branch
run: |
- git fetch origin ref: ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
+ git fetch origin ${base_ref}:${base_ref}
- name: Analyze Code with Darker
run: |
- darker -r current... --check --diff --lint "ruff check" --isort --color ./src
+ darker -r ${base_ref}... --check --diff --lint "ruff check" --isort --color ./src
+
+
+ # - name: analyze
+ # run: |
+ # darker -r current .
+
+ # - name: Get head commit ID
+ # id: get-head-commit
+ # run: |
+ # HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH")
+ # echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT"
+
+ # - name: Get base commit ID
+ # id: get-base-commit
+ # run: |
+ # BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH")
+ # echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT"
+
+ # - name: Use commit IDs
+ # run: |
+ # echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}"
+ # echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}"
+
+ # - uses: akaihola/darker@v2.1.1
+ # with:
+ # options: "--revision current...HEAD --check --diff --isort --color"
+ # src: "."
+ # version: "~=2.1.1"
+ # lint: "flake8,pylint==2.13.1"