feat(mr note): add --resolve and --unresolve flags
Summary
Adds --resolve and --unresolve flags to the glab mr note command to allow resolving and unresolving discussions by note ID.
-
--resolve <note-id>: Resolves the discussion containing the specified note -
--unresolve <note-id>: Unresolves the discussion containing the specified note
The flags are mutually exclusive with each other and with --message. Users can now resolve/unresolve discussions without needing to know the discussion ID hash, using the more visible note ID instead.
Changes
- Added
--resolveand--unresolveflags tomr notecommand - Implemented
resolveDiscussion()helper function that:- Lists all discussions in the MR
- Finds the discussion containing the specified note ID
- Calls the GitLab API to resolve/unresolve the discussion
- Added comprehensive tests for both resolve and unresolve functionality
- Updated documentation
Example Usage
# Resolve a discussion by note ID
glab mr note 123 --resolve 3107030349
# Unresolve a discussion by note ID
glab mr note 123 --unresolve 3107030349
Part of Stack
This is MR 3 in a stack of changes:
-
!2892 (merged) - Switch
mr view --commentsto Discussions API -
!2893 (merged) - Add
--resolvedand--unresolvedfiltering flags - This MR - Add resolve/unresolve commands
Edited by Kai Armstrong