Stale branches
stale_branchesFind old Git branches for cleanup by listing those with commits at least N days old, oldest first, and showing which are already merged into HEAD.
Instructions
List branches whose latest commit is at least N days old, oldest first, and whether each is already merged into HEAD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Size of the time window in days. | |
| repo | No | Repository name or absolute path from the allowlist. Defaults to the first configured repo. | |
| limit | No | Maximum number of results (1-200). | |
| mergedOnly | No | Only list branches already merged into HEAD, i.e. safe cleanup candidates. | |
| includeRemote | No | Also include remote-tracking branches. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Name of the repository that was queried. | |
| branches | Yes | ||
| staleCount | Yes | ||
| thresholdDays | Yes | ||
| totalBranches | Yes |