Skip to content

feat: add issue link list and delete commands#43

Merged
Hinne1 merged 1 commit intomainfrom
claude/issue-link-list-delete
Mar 24, 2026
Merged

feat: add issue link list and delete commands#43
Hinne1 merged 1 commit intomainfrom
claude/issue-link-list-delete

Conversation

@Hinne1
Copy link
Contributor

@Hinne1 Hinne1 commented Mar 24, 2026

Summary

  • atl issue link PROJ-1 --list — show all links on an issue (ID, relation, linked key, summary)
  • atl issue link PROJ-1 --delete <id> — remove a link by ID (validates it exists first)

Closes the gap where links could be created but never inspected or cleaned up.

API additions

  • GetIssueLinks(ctx, issueKey) — fetches issuelinks field from issue
  • DeleteIssueLink(ctx, linkID)DELETE /rest/api/3/issueLink/{id}

Test plan

  • make check — lint + tests pass
  • Tested live: atl issue link NX-15370 --list shows links with correct relation/summary
  • Tested live: atl issue link NX-15370 --delete 132186 removed a stale Blocks link
  • Existing --list-types and create flow unchanged

Add --list flag to show all links on an issue with ID, relation,
linked issue key and summary. Add --delete flag to remove a link
by ID (validates link exists on the issue first).

API additions: GetIssueLinks, DeleteIssueLink on JiraService.
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the atl issue link command by adding crucial functionality for managing existing issue links. Previously, users could create links but had no direct way to inspect or remove them via the command-line tool. The new features address this by providing commands to list all links on an issue and to delete a specific link, thereby improving the overall utility and completeness of the issue link management experience.

Highlights

  • New Commands: Introduced atl issue link <issue-key> --list to display all links associated with a given Jira issue, showing ID, relation, linked key, and summary.
  • Link Deletion: Added atl issue link <issue-key> --delete <link-id> to remove a specific issue link by its ID, with validation to ensure the link exists.
  • API Enhancements: Implemented new API methods GetIssueLinks(ctx, issueKey) to fetch issue links and DeleteIssueLink(ctx, linkID) to remove them, closing a gap in link management capabilities.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces valuable new functionality for managing issue links by adding commands to list and delete them. The implementation is well-structured and follows the existing patterns in the codebase. The API service layer is cleanly extended with GetIssueLinks and DeleteIssueLink functions. The command-level logic in internal/cmd/issue/link.go is robust, handling different argument counts for create, list, and delete operations. I particularly appreciate the pre-flight check in runDeleteLink that verifies a link exists on the specified issue before attempting deletion, which greatly improves user safety and experience. I have one suggestion to make the argument validation even more robust.

Comment on lines 60 to 62
if opts.ListTypes {
return nil
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The argument validation for --list-types could be made more strict. Currently, if a user provides arguments with this flag (e.g., atl issue link --list-types some-arg), the arguments are ignored. It would be better to return an error to inform the user that this flag does not accept arguments. This improves the command's robustness and provides clearer feedback to the user.

            if len(args) != 0 {
                return fmt.Errorf("the --list-types flag does not accept any arguments")
            }
            return nil

@Hinne1 Hinne1 marked this pull request as ready for review March 24, 2026 11:30
@Hinne1 Hinne1 merged commit 129dd12 into main Mar 24, 2026
7 checks passed
@Hinne1 Hinne1 deleted the claude/issue-link-list-delete branch March 24, 2026 11:30
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/enthus-appdev/atl-cli/internal/api 36.35% (-0.18%) 👎
github.com/enthus-appdev/atl-cli/internal/cmd/issue 6.41% (-0.37%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/enthus-appdev/atl-cli/internal/api/jira.go 17.42% (-0.28%) 442 (+7) 77 365 (+7) 👎
github.com/enthus-appdev/atl-cli/internal/cmd/issue/link.go 0.00% (ø) 136 (+75) 0 136 (+75)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

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.

1 participant