Skip to content

feat(links): add first-class support for issue links#164

Merged
piekstra merged 2 commits intomainfrom
feat/148-issue-links
Feb 18, 2026
Merged

feat(links): add first-class support for issue links#164
piekstra merged 2 commits intomainfrom
feat/148-issue-links

Conversation

@piekstra
Copy link
Contributor

Summary

Closes #148

Adds jtk links command group with full CRUD support for Jira issue links:

  • jtk links list <issue-key> — list all links on an issue (table/JSON output)
  • jtk links create <outward> <inward> --type <name> — create a link between two issues
  • jtk links delete <link-id> — delete a link by ID
  • jtk links types — list available link types in the instance

Usage

# List links on an issue
jtk links list PROJ-123

# Create a link: "PROJ-123 blocks PROJ-456"
jtk links create PROJ-123 PROJ-456 --type Blocks

# Delete a link by ID (find IDs via list)
jtk links delete 10001

# List available link types
jtk links types

Implementation

  • API layer (api/links.go): GetIssueLinks, CreateIssueLink, DeleteIssueLink, GetIssueLinkTypes
  • Command layer (internal/cmd/links/): list, create, delete, types subcommands
  • Validates link type name against available types before creating
  • Aliases: jtk links, jtk link, jtk l

Test plan

  • API tests: TestGetIssueLinks, TestCreateIssueLink, TestDeleteIssueLink, TestGetIssueLinkTypes
  • Command tests: TestRunList, TestRunCreate, TestRunDelete, TestRunTypes, TestRunCreate_InvalidType
  • All existing tests pass
  • golangci-lint run clean

@piekstra piekstra force-pushed the feat/148-issue-links branch from aabb4eb to 47c0dce Compare February 18, 2026 18:35
Adds `jtk links` command group with full CRUD support for Jira issue
links:
- `jtk links list <issue-key>` — list all links on an issue
- `jtk links create <outward> <inward> --type <name>` — create a link
- `jtk links delete <link-id>` — delete a link
- `jtk links types` — list available link types

Includes API layer (api/links.go) and comprehensive unit tests for
both API operations and command handlers.
When Jira returns InwardIssue, the current issue is the outward side
(and vice versa). The direction labels were swapped.
@piekstra piekstra force-pushed the feat/148-issue-links branch from 47c0dce to 7f7f9d0 Compare February 18, 2026 18:38
@piekstra piekstra merged commit 2ad774d into main Feb 18, 2026
7 checks passed
@piekstra piekstra deleted the feat/148-issue-links branch February 18, 2026 18:39
rianjs added a commit that referenced this pull request Feb 19, 2026
…DS.md

Bring the dashboards (#165), links (#164), and text packages — added to
main after the branch diverged — into alignment with the project coding
standards applied by earlier commits in this branch:

- Replace c.get/post/delete helpers with context-aware c.Get/Post/Delete
- Convert testify assertions to shared/testutil helpers
- Add _ = to unhandled json.NewEncoder errors (gosec G104)
- Rename unused cmd/r parameters to _ (revive unused-parameter)
- Add package doc comments (revive package-comments)
- Wire context.Context through changeIssueType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jtk: first-class support for issue links

1 participant

Comments