Skip to content

feat: add no-duplicate flag

Camilla Conte requested to merge spotlesstofu/cli:check-duplicates into main

Description

  • add the --no-duplicate flag to the mr note create command
  • do an additional API request to list the existing notes
  • don't create a new note if the message already exists
  • print the URL to the existing note

Related Issues

Resolves #1071 (closed)

How has this been tested?

  • Compiled and tried the command both with and without the new flag on a test repo on Gitlab.com.
  • Implemented and ran a new test in the file mr_note_create_test.go.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

Merge request reports