generated from permafrost-dev/go-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
docs: expand JIRA integration instructions #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
patinthehat
wants to merge
11
commits into
main
Choose a base branch
from
codex/update-readme-for-jira-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6443b5f
docs: expand JIRA integration instructions
patinthehat 29af265
Apply suggestion from @amazon-q-developer[bot]
patinthehat 479a9d0
Merge branch 'main' into codex/update-readme-for-jira-integration
patinthehat dcdb8d5
Update README.md
patinthehat bc34f20
Initial plan
Copilot 7a11d42
Apply suggestion from @coderabbitai[bot]
patinthehat 197f8b6
Merge branch 'main' into codex/update-readme-for-jira-integration
patinthehat 90d46b1
Fix JIRA integration docs: use .env format and add security reminder
Copilot f292144
Update Go version in CI workflow to 1.25
patinthehat 4841ff0
Merge pull request #30 from permafrost-dev/copilot/sub-pr-23
patinthehat 1162fba
Merge branch 'main' into codex/update-readme-for-jira-integration
patinthehat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,18 +135,34 @@ 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. | ||
|
|
||
patinthehat marked this conversation as resolved.
Show resolved
Hide 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 <https://id.atlassian.com/manage-profile/security/api-tokens>. | ||
| - Click **Create API token** and copy the generated value. | ||
|
|
||
patinthehat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ```bash | ||
| git-ninja branch:recent --jira | ||
| # 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="[email protected]" | ||
| export JIRA_EMAIL_ADDRESS="[email protected]" | ||
| ``` | ||
|
|
||
| To enable the JIRA integration, set the `JIRA_API_TOKEN`, `JIRA_SUBDOMAIN` and `JIRA_EMAIL_ADDRESS` environment variables. | ||
| Add these to your shell profile or `.env` file so `git-ninja` can authenticate with JIRA. | ||
patinthehat marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
patinthehat marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 3. **Run `branch:recent` with the `--jira` flag** | ||
|
|
||
| ```bash | ||
| git-ninja branch:recent --jira | ||
| ``` | ||
|
|
||
| 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. | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Development Setup | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.