feat(jira): add getActiveIssue command to expose active issue key to other extensions#1780
Open
OutOfBears wants to merge 2 commits intoatlassian:mainfrom
Open
feat(jira): add getActiveIssue command to expose active issue key to other extensions#1780OutOfBears wants to merge 2 commits intoatlassian:mainfrom
OutOfBears wants to merge 2 commits intoatlassian:mainfrom
Conversation
…ension-to-expose-active-task Expose active Jira issue key via `atlascode.jira.getActiveIssue` command
|
Thank you for your submission! Like many open source projects, we ask that you sign our CLA (Contributor License Agreement) before we can accept your contribution. Already signed the CLA? To re-check, try refreshing the page. |
Contributor
|
To enable Rovo Dev code reviews, link your GitHub account to your Atlassian account. This is a one-time task that takes less than a minute. Once your account is linked, resubmit the pull request to trigger a code review. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Is This Change?
Adds a new VS Code command
atlascode.jira.getActiveIssuethat returns the key of the currently active Jira issue displayed in the status bar.This allows other VS Code extensions and tasks (e.g., git commit hooks, custom task runners, or companion extensions) to programmatically retrieve the active Jira issue key without scraping the UI. The command is registered in the
JiraActiveIssueStatusBarand simply returnsthis.activeIssue?.key, so it's lightweight and has no side effects.Changes across 5 files:
package.json— Registers the newatlascode.jira.getActiveIssuecommand under the "Jira" category.src/constants.ts— Adds theJiraGetActiveIssueentry to theCommandsenum.src/views/jira/activeIssueStatusBar.ts— Imports the new command constant and registers a handler viacommands.registerCommandthat returns the active issue's key (orundefinedif none is set).src/views/jira/activeIssueStatusBar.test.ts— Adds a test verifying the command is registered and returns the expected issue key.CHANGELOG.md— Documents the new command in the Unreleased section.How Has This Been Tested?
activeIssueStatusBar.test.tsthat confirms the command is registered and returns the correct issue key ('TEST-123') when an active issue is present.this.activeIssue?.key), so risk of regression is minimal.Basic checks:
npm run lintnpm run testAdvanced checks:
Recommendations:
Rovo Dev code review: Rovo Dev couldn't review this pull request
The pull request author does not have access to Rovo Dev.