From 2224a9e0de0477dd00dc53ec7b0b1221c5746c03 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:51:08 +0000 Subject: [PATCH 1/2] Initial plan From 999621c1da5b25e10250e5da535b57080db0f9c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:53:14 +0000 Subject: [PATCH 2/2] fix: default checkout fetch depth to 1 Agent-Logs-Url: https://github.com/PandasWhoCode/initialize-github-job/sessions/71954cac-3492-4be9-8649-25f1c0429b3d Co-authored-by: andrewb1269 <184121471+andrewb1269@users.noreply.github.com> --- .github/workflows/test.yml | 4 +++- README.md | 2 +- action.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2c4512..dc1e1fb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,7 +125,6 @@ jobs: id: test-checkout with: checkout: true - checkout-fetch-depth: 0 checkout-ref: main checkout-submodules: false checkout-token: ${{ secrets.GITHUB_TOKEN }} @@ -136,6 +135,9 @@ jobs: echo "Checkout Commit: ${{ steps.test-checkout.outputs.checkout-commit }}" git_value=$(git log -1 --oneline) echo "Git Commit: ${git_value}" + shallow_value=$(git rev-parse --is-shallow-repository) + echo "Is Shallow Repository: ${shallow_value}" + test "${shallow_value}" = "true" test-setup-java: name: Test Setup Java Action diff --git a/README.md b/README.md index 10547a4..64c1909 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Common steps for initializing a job for GitHub actions. This composite action co | checkout | Whether to checkout the repository | No | - | `true`/`false` | | checkout-ref | The branch, tag or SHA to checkout | No | - | any `branch`/`tag`/`SHA` | | checkout-token | Personal access token (PAT) used to fetch the repository | No | - | `Token` used for checkout | -| checkout-fetch-depth | Depth of commit history to fetch | No | 0 | `0` (full)/`1`/`2`/... | +| checkout-fetch-depth | Depth of commit history to fetch | No | 1 | `0` (full)/`1`/`2`/... | | checkout-submodules | Whether to fetch submodules | No | false | `true`/`false`/`recursive` | **Java** diff --git a/action.yml b/action.yml index f1d95e4..06b11d1 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ inputs: checkout-fetch-depth: description: 'Depth of commit history to fetch' required: false - default: '0' + default: '1' checkout-submodules: description: 'Whether to checkout submodules (true/false/recursive)' default: 'false'