Skip to content

Conversation

@justinxu421
Copy link
Contributor

@justinxu421 justinxu421 commented Oct 9, 2025

Add configurable git checkout depth for performance optimization

Introduces an optional fetch_depth parameter that allows users to control the number of commits fetched during checkout, enabling shallow clones for faster performance on large repositories.

Key Changes

  • Add fetch_depth input parameter to the action with a default value of 0 (full history)
  • Update checkout step to use the configurable depth instead of hardcoded value
  • Document the new parameter in the README inputs table
  • Add "Performance Optimization" section with usage examples

Benefits

  • Faster checkouts: Shallow clones can significantly reduce checkout time for repositories with extensive history
  • Flexible configuration: Users can choose the optimal depth based on their needs
  • Backward compatible: Default behavior remains unchanged (full history)

Usage Example

- name: Generate PR Description
  uses: augmentcode/describe-pr@v0
  with:
    augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
    github_token: ${{ secrets.GITHUB_TOKEN }}
    pull_number: ${{ github.event.pull_request.number }}
    repo_name: ${{ github.repository }}
    fetch_depth: 50  # Only fetch last 50 commits for faster checkout

🤖 This description was generated automatically. Please react with 👍 if it's helpful or 👎 if it needs improvement.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Review completed. The implementation looks solid overall - the feature is well-designed and properly documented. I have one minor suggestion about type handling for the fetch_depth parameter.


🤖 Automated review complete. Please react with 👍 or 👎 on the individual review comments to provide feedback on their usefulness.

@justinxu421 justinxu421 marked this pull request as ready for review October 9, 2025 00:07
@justinxu421
Copy link
Contributor Author

augment review

Copy link

@augment-app-staging augment-app-staging bot left a comment

Choose a reason for hiding this comment

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

Clear, backward-compatible addition of a configurable checkout depth with matching documentation updates. The default preserves existing behavior while enabling performance tuning. Review completed with no suggestions at this time.

@justinxu421 justinxu421 merged commit 74d48ab into main Oct 9, 2025
1 check passed
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.

3 participants