Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
env:
GO_VERSION: "~1.23"
GO_VERSION: "~1.25"
GO111MODULE: "on"
USE_CODECOV: true

Expand Down
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,35 @@ git co-last # switch from feature/my-feature to main
```

## JIRA Integration
The `branch:recent` command can be run with the `--jira` flag to refine the ordering of the results using live data from JIRA. When your branch names include a JIRA issue key, branches tied to active issues you've updated recently appear closer to the top.
Comment thread
patinthehat marked this conversation as resolved.

Comment thread
patinthehat marked this conversation as resolved.
The `branch:recent` command can be run with the `--jira` flag to slightly modify the ordering of the results based on open issues in JIRA. Assuming your branches contain
the JIRA issue key in the branch name, the command will rank branches with open issues that have been updated recently slightly higher in the list.
### Configuration

Tickets with a higher numerical suffix and have been recently updated are ranked slightly higher in the list,
while tickets that have not been updated recently are ranked lower.
1. **Create an API token**
- Visit [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens).
- Click **Create API token** and copy the generated value.

Comment thread
patinthehat marked this conversation as resolved.
```bash
git-ninja branch:recent --jira
```
2. **Configure credentials**

Create a `.env` file in your project root:

```env
JIRA_API_TOKEN=your-token
JIRA_SUBDOMAIN=acme
JIRA_EMAIL_ADDRESS=you@example.com
```

**Important:** Do not commit `.env` to version control. Add it to `.gitignore` to keep your credentials secure.

3. **Run `branch:recent` with the `--jira` flag**

```bash
git-ninja branch:recent --jira
```

To enable the JIRA integration, set the `JIRA_API_TOKEN`, `JIRA_SUBDOMAIN` and `JIRA_EMAIL_ADDRESS` environment variables.
Results are cached for 5 minutes to avoid repeated API calls.
Recently updated issues rank higher; inactive ones rank lower.
If cache TTL is configurable, document the flag or env var here.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## Development Setup

Expand Down
Loading