From f931a42b717cf674d8c143107a3a0c3fe453f80d Mon Sep 17 00:00:00 2001 From: Yuta Nakamura Date: Thu, 30 Nov 2023 21:49:41 +0900 Subject: [PATCH] test --- .github/workflows/auto-pull-request.yml | 5 ----- dist/index.js | 2 +- src/git-util.ts | 6 +++--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auto-pull-request.yml b/.github/workflows/auto-pull-request.yml index a527572..d69872e 100644 --- a/.github/workflows/auto-pull-request.yml +++ b/.github/workflows/auto-pull-request.yml @@ -16,11 +16,6 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 - - name: Run a script - run: | - git log origin/test/ci..origin/release-stg - echo "==========================" - git log origin/test/ci - name: Run a script uses: ./ with: diff --git a/dist/index.js b/dist/index.js index cd4bbae..e8d42a4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -34364,7 +34364,7 @@ const core_1 = __nccwpck_require__(9093); const simple_git_1 = __importDefault(__nccwpck_require__(791)); const git = (0, simple_git_1.default)(); async function fetchRemoteBranches() { - await git.fetch([]); + await git.fetch(["--unshallow"]); const branches = await git.branch(["-r"]); return branches.all.map((branch) => branch.replace("origin/", "")); } diff --git a/src/git-util.ts b/src/git-util.ts index 0e0a960..0783f1d 100644 --- a/src/git-util.ts +++ b/src/git-util.ts @@ -11,7 +11,7 @@ export async function fetchRemoteBranches() { export async function hasCommitsBetween( srcBranch: string, - targetBranch: string + targetBranch: string, ) { const commits = await git.log({ from: srcBranch, @@ -20,8 +20,8 @@ export async function hasCommitsBetween( }); debug( `Commits between ${srcBranch} and ${targetBranch}: ${JSON.stringify( - commits - )}` + commits, + )}`, ); return commits.total > 0; }