From 0f324361e435e46bc79a0564938f3a2ce2d24d03 Mon Sep 17 00:00:00 2001 From: Austin Marshall Date: Tue, 7 Oct 2025 19:41:54 -0700 Subject: [PATCH] Add optional fetch_depth option for shallow clones --- README.md | 1 + action.yml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cfaf84..019624f 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ Each example includes a complete workflow file that you can copy to your `.githu | `model` | Optional model name to use; passed directly to augment agent | No | e.g. `sonnet4`, from `auggie --list-models` | | `rules` | JSON array of rule file paths forwarded to augment agent as repeated `--rules` flags | No | `'[".augment/rules.md"]'` | | `mcp_configs` | JSON array of MCP config file paths forwarded as repeated `--mcp-config` flags | No | `'[".augment/mcp.json"]'` | +| `fetch_depth` | Number of commits to fetch. Use `0` for full history (default), `1` for shallow clone, or any positive integer for specific depth | No | `1` (shallow), `50` (last 50 commits), `0` (full) | ## How It Works diff --git a/action.yml b/action.yml index d582c81..5899402 100644 --- a/action.yml +++ b/action.yml @@ -30,6 +30,10 @@ inputs: mcp_configs: description: "Optional JSON array of MCP config file paths to forward as --mcp-config flags to augmentcode/augment-agent." required: false + fetch_depth: + description: "Number of commits to fetch. Use '0' for full history (default), '1' for shallow clone (latest commit only), or any positive integer for a specific depth." + required: false + default: "0" runs: using: "composite" @@ -39,7 +43,7 @@ runs: with: token: ${{ inputs.github_token }} ref: refs/pull/${{ inputs.pull_number }}/head - fetch-depth: 0 + fetch-depth: ${{ inputs.fetch_depth }} - name: Prepare Custom Context id: custom_context