From 6443b5fd48ddae96c7daf87cd4f70f420006a28c Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Thu, 11 Sep 2025 18:54:43 -0400 Subject: [PATCH 1/7] docs: expand JIRA integration instructions --- README.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2d21c60..7bee7ac 100644 --- a/README.md +++ b/README.md @@ -135,18 +135,31 @@ 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. -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 . + - Click **Create API token** and copy the generated value. -```bash -git-ninja branch:recent --jira -``` +2. **Export the required environment variables** + + ```bash + export JIRA_API_TOKEN="your-token" + export JIRA_SUBDOMAIN="acme" # for https://acme.atlassian.net + export JIRA_EMAIL_ADDRESS="you@example.com" + ``` + + Add these to your shell profile or `.env` file so `git-ninja` can authenticate with JIRA. + +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 five minutes to avoid repeated API calls. Tickets with higher numbers that have been updated recently are ranked above older or inactive issues. ## Development Setup From 29af265a2cc7382e5fec186a9663483de9754bea Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Mon, 8 Dec 2025 09:23:49 -0500 Subject: [PATCH 2/7] Apply suggestion from @amazon-q-developer[bot] Co-authored-by: amazon-q-developer[bot] <208079219+amazon-q-developer[bot]@users.noreply.github.com> --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7bee7ac..a6efe61 100644 --- a/README.md +++ b/README.md @@ -143,11 +143,11 @@ The `branch:recent` command can be run with the `--jira` flag to refine the orde - Visit . - Click **Create API token** and copy the generated value. -2. **Export the required environment variables** - - ```bash + # Recommended: Use a secure credential manager or encrypted .env file + # Store these credentials in an encrypted .env file, not in your shell profile export JIRA_API_TOKEN="your-token" - export JIRA_SUBDOMAIN="acme" # for https://acme.atlassian.net + export JIRA_SUBDOMAIN="acme" # for + export JIRA_EMAIL_ADDRESS="you@example.com" export JIRA_EMAIL_ADDRESS="you@example.com" ``` From dcdb8d5ecffb37a2af461e4357ddbbbb16b728a1 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Wed, 10 Dec 2025 00:51:01 -0500 Subject: [PATCH 3/7] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a6efe61..6541573 100644 --- a/README.md +++ b/README.md @@ -143,13 +143,14 @@ The `branch:recent` command can be run with the `--jira` flag to refine the orde - Visit . - Click **Create API token** and copy the generated value. +```bash # Recommended: Use a secure credential manager or encrypted .env file # Store these credentials in an encrypted .env file, not in your shell profile export JIRA_API_TOKEN="your-token" export JIRA_SUBDOMAIN="acme" # for export JIRA_EMAIL_ADDRESS="you@example.com" export JIRA_EMAIL_ADDRESS="you@example.com" - ``` +``` Add these to your shell profile or `.env` file so `git-ninja` can authenticate with JIRA. From bc34f2006f78af3df9e2f08c5fe5a3294a7211a1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 05:52:48 +0000 Subject: [PATCH 4/7] Initial plan From 7a11d428ae5af01181de2186d922902a147eecae Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Wed, 10 Dec 2025 00:53:14 -0500 Subject: [PATCH 5/7] Apply suggestion from @coderabbitai[bot] Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6541573..633f8ad 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,9 @@ The `branch:recent` command can be run with the `--jira` flag to refine the orde git-ninja branch:recent --jira ``` -Results are cached for five minutes to avoid repeated API calls. Tickets with higher numbers that have been updated recently are ranked above older or inactive issues. +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. ## Development Setup From 90d46b1ffa8fdcc3c6a40775a39ca746ad62077a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 05:56:15 +0000 Subject: [PATCH 6/7] Fix JIRA integration docs: use .env format and add security reminder Co-authored-by: patinthehat <5508707+patinthehat@users.noreply.github.com> --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6541573..2e1f4a3 100644 --- a/README.md +++ b/README.md @@ -140,19 +140,20 @@ The `branch:recent` command can be run with the `--jira` flag to refine the orde ### Configuration 1. **Create an API token** - - Visit . + - Visit [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens). - Click **Create API token** and copy the generated value. -```bash - # Recommended: Use a secure credential manager or encrypted .env file - # Store these credentials in an encrypted .env file, not in your shell profile - export JIRA_API_TOKEN="your-token" - export JIRA_SUBDOMAIN="acme" # for - export JIRA_EMAIL_ADDRESS="you@example.com" - export JIRA_EMAIL_ADDRESS="you@example.com" -``` +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 + ``` - Add these to your shell profile or `.env` file so `git-ninja` can authenticate with JIRA. + **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** From f292144b33e8285ce022a6c59ee1b6b980144ad7 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Wed, 10 Dec 2025 00:58:08 -0500 Subject: [PATCH 7/7] Update Go version in CI workflow to 1.25 --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 253fc2b..ac981c4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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