Stale branches
stale_branchesFind branches whose latest commit is at least N days old, oldest first, and check if each is already merged into HEAD to flag cleanup candidates.
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 | Time window in days. | |
| repo | No | Repo name or path; defaults to the first configured repo. | |
| limit | No | Maximum number of results. | |
| 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 |