From 695265c6f2d8a3037dd262d815e699571478735b Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:58:13 +0530 Subject: T0000: repo ref --- .github/workflows/darker-lint.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 07889f0..5709c02 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -24,7 +24,8 @@ jobs: with: fetch-depth: 0 fetch-tags: true - # ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - uses: actions/setup-python@v5 @@ -35,14 +36,20 @@ jobs: # - name: Fetch base branch # run: | # git fetch origin ${base_ref}:refs/remotes/origin/base-current + + # - name: Fetch base branch + # run: | + # git fetch origin ${base_ref}:${base_ref} + - name: Fetch base and head commits run: | - git fetch origin ${{ github.event.pull_request.base.sha }}:refs/remotes/origin/temp-base - git fetch origin ${{ github.event.pull_request.head.sha }}:refs/remotes/origin/temp-head - git branch temp-base refs/remotes/origin/temp-base - git branch temp-head refs/remotes/origin/temp-head + git fetch origin ${{ github.event.pull_request.base.repo.full_name }} ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/base + # git fetch origin ${{ github.event.pull_request.base.sha }}:refs/remotes/origin/temp-base + # git fetch origin ${{ github.event.pull_request.head.sha }}:refs/remotes/origin/temp-head + # git branch temp-base refs/remotes/origin/temp-base + # git branch temp-head refs/remotes/origin/temp-head - name: Analyze Code run: | - darker -r temp-base...temp-head --check --diff --lint "ruff check" --color . \ No newline at end of file + darker -r origin/base --check --diff --lint "ruff check" --color . \ No newline at end of file -- cgit v1.2.3