Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 35 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,43 @@ Each example includes a complete workflow file that you can copy to your `.githu

## Advanced

### Performance Optimization

For large repositories with extensive history, you can significantly speed up the checkout process by using a shallow clone:

```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 1 # Shallow clone for faster checkout
```

The `fetch-depth` parameter controls how much history is fetched:

- `fetch-depth: 1` - Only the latest commit (fastest for most use cases)
- `fetch-depth: 50` - Last 50 commits (balance between speed and history)
- `fetch-depth: 0` - Full history (slowest but complete, default behavior)

For most PR reviews and code analysis, a shallow clone (`fetch-depth: 1`) provides sufficient context while significantly reducing checkout time.

### Inputs

| Input | Description | Required | Example |
| ---------------------- | --------------------------------------------------------------------------------------- | -------- | ------------------------------------------- |
| `augment_session_auth` | Augment session authentication JSON (store as secret) | No\*\* | `${{ secrets.AUGMENT_SESSION_AUTH }}` |
| `augment_api_token` | API token for Augment services (store as secret) | No\*\* | `${{ secrets.AUGMENT_API_TOKEN }}` |
| `augment_api_url` | Augment API endpoint URL (store as variable) | No\*\* | `${{ vars.AUGMENT_API_URL }}` |
| `github_token` | GitHub token with `repo` and `user:email` scopes. | No | `${{ secrets.GITHUB_TOKEN }}` |
| `instruction` | Direct instruction text for simple commands | No\* | `"Generate PR description"` |
| `instruction_file` | Path to file with detailed instructions | No\* | `/tmp/instruction.txt` |
| `template_directory` | Path to template directory for dynamic instructions | No\* | `.github/templates` |
| `template_name` | Template file name (default: prompt.njk) | No | `pr-review.njk` |
| `pull_number` | PR number for template context extraction | No | `${{ github.event.pull_request.number }}` |
| `repo_name` | Repository name for template context | No | `${{ github.repository }}` |
| `custom_context` | Additional JSON context for templates | No | `'{"priority": "high"}'` |
| `model` | Model to use; passed through to auggie as --model | No | e.g. `sonnet4`, from `auggie --list-models` |
| `rules` | JSON array of rules file paths (each forwarded as individual `--rules` flags) | No | `'[".github/augment/rules.md"]'` |
| `mcp_configs` | JSON array of MCP config file paths (each forwarded as individual `--mcp-config` flags) | No | `'[".augment/mcp/config.json"]'` |
| Input | Description | Required | Example |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------- |
| `augment_session_auth` | Augment session authentication JSON (store as secret) | No\*\* | `${{ secrets.AUGMENT_SESSION_AUTH }}` |
| `augment_api_token` | API token for Augment services (store as secret) | No\*\* | `${{ secrets.AUGMENT_API_TOKEN }}` |
| `augment_api_url` | Augment API endpoint URL (store as variable) | No\*\* | `${{ vars.AUGMENT_API_URL }}` |
| `github_token` | GitHub token with `repo` and `user:email` scopes. | No | `${{ secrets.GITHUB_TOKEN }}` |
| `instruction` | Direct instruction text for simple commands | No\* | `"Generate PR description"` |
| `instruction_file` | Path to file with detailed instructions | No\* | `/tmp/instruction.txt` |
| `template_directory` | Path to template directory for dynamic instructions | No\* | `.github/templates` |
| `template_name` | Template file name (default: prompt.njk) | No | `pr-review.njk` |
| `pull_number` | PR number for template context extraction | No | `${{ github.event.pull_request.number }}` |
| `repo_name` | Repository name for template context | No | `${{ github.repository }}` |
| `custom_context` | Additional JSON context for templates | No | `'{"priority": "high"}'` |
| `model` | Model to use; passed through to auggie as --model | No | e.g. `sonnet4`, from `auggie --list-models` |
| `rules` | JSON array of rules file paths (each forwarded as individual `--rules` flags) | No | `'[".github/augment/rules.md"]'` |
| `mcp_configs` | JSON array of MCP config file paths (each forwarded as individual `--mcp-config` flags) | No | `'[".augment/mcp/config.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) |
Copy link

Choose a reason for hiding this comment

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

Documentation Issue: Parameter doesn't belong to this action

This documents fetch_depth as an input to the Augment Agent action, but this parameter should not be part of this action's interface. The fetch-depth parameter belongs to actions/checkout@v4, not to this action.

The Performance Optimization section (lines 67-82) correctly shows users how to configure fetch-depth for actions/checkout@v4, which is the right approach. However, this line in the inputs table incorrectly suggests that fetch_depth is an input to the Augment Agent action itself.

Recommendation: Remove this row from the inputs table. The Performance Optimization section already provides clear guidance on using fetch-depth with the checkout action.


\*Either `instruction`, `instruction_file`, or `template_directory` must be provided.

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ inputs:
mcp_configs:
description: "JSON array of MCP config file paths. Each entry is forwarded to auggie as an individual --mcp-config flag."
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"
Copy link

Choose a reason for hiding this comment

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

Critical Issue: Parameter defined but not passed to implementation

The fetch_depth input is defined here but is never passed to the action's implementation. Looking at lines 74-88, the environment variables section doesn't include INPUT_FETCH_DEPTH.

To fix this, you need to add the following to the env: block (around line 88):

INPUT_FETCH_DEPTH: ${{ inputs.fetch_depth }}

However, there's a deeper conceptual issue: this action doesn't perform any git checkout operations. The fetch-depth parameter is meant for actions/checkout@v4, which users already call in their workflows before this action runs. Adding fetch_depth as an input to this action serves no purpose since the checkout has already happened by the time this action executes.

Recommendation: Remove the fetch_depth input from action.yml entirely. The documentation updates showing users how to use fetch-depth with actions/checkout@v4 are valuable and should be kept, but this action doesn't need to accept or handle this parameter.


runs:
using: "composite"
Expand Down