Skip to content

fix: default checkout-fetch-depth to shallow clone (1)#49

Merged
andrewb1269 merged 2 commits intomainfrom
copilot/set-default-checkout-fetch-depth-1
Apr 14, 2026
Merged

fix: default checkout-fetch-depth to shallow clone (1)#49
andrewb1269 merged 2 commits intomainfrom
copilot/set-default-checkout-fetch-depth-1

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

This action currently defaults checkout-fetch-depth to 0, which fetches full history. This PR aligns default behavior with the issue requirement by making shallow checkout (1) the default while preserving explicit override support (0, 2, etc.).

  • Default behavior update

    • Changed inputs.checkout-fetch-depth.default in action.yml from 0 to 1.
  • Documentation alignment

    • Updated the README input table to reflect default checkout-fetch-depth: 1.
  • Focused workflow coverage for default path

    • Updated checkout workflow coverage to exercise the default (no explicit checkout-fetch-depth in test-checkout).
    • Added a shallow-repo assertion in the checkout verification step.
# action.yml
inputs:
  checkout-fetch-depth:
    description: 'Depth of commit history to fetch'
    required: false
    default: '1'

Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
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>
Copilot AI changed the title [WIP] Update default checkout fetch depth to 1 Default checkout-fetch-depth to shallow clone (1) Apr 14, 2026
Copilot AI requested a review from andrewb1269 April 14, 2026 18:55
@andrewb1269 andrewb1269 marked this pull request as ready for review April 14, 2026 19:00
Copilot AI review requested due to automatic review settings April 14, 2026 19:00
@andrewb1269 andrewb1269 changed the title Default checkout-fetch-depth to shallow clone (1) fix: default checkout-fetch-depth to shallow clone (1) Apr 14, 2026
@andrewb1269 andrewb1269 merged commit 701f928 into main Apr 14, 2026
22 checks passed
@andrewb1269 andrewb1269 deleted the copilot/set-default-checkout-fetch-depth-1 branch April 14, 2026 19:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the composite action’s default repository checkout behavior to use a shallow clone (fetch depth 1) instead of fetching full history, and aligns docs/tests with that new default.

Changes:

  • Updated checkout-fetch-depth default in action.yml from 0 (full history) to 1 (shallow).
  • Updated README input table to reflect the new default.
  • Adjusted the checkout-focused workflow to exercise the default path and assert the repo is shallow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
action.yml Sets checkout-fetch-depth default to shallow clone (1).
README.md Updates documented default for checkout-fetch-depth to 1.
.github/workflows/test.yml Removes explicit fetch-depth override in test-checkout and adds an assertion that checkout is shallow by default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default checkout fetch depth should be 1

4 participants