Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minder's "repo register" command now checks already registered repos. #3236

Merged
merged 1 commit into from
May 8, 2024

Conversation

blkt
Copy link
Contributor

@blkt blkt commented May 3, 2024

Summary

Makes it so that minder CLI leverages changes introduced here.

Fixes #2627

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@blkt blkt self-assigned this May 3, 2024
Base automatically changed from issue-2627 to main May 6, 2024 09:24
@blkt blkt force-pushed the issue-2627-cli branch 2 times, most recently from d76d4f9 to f099fb0 Compare May 6, 2024 11:17
@blkt
Copy link
Contributor Author

blkt commented May 6, 2024

Listing message differences by scenario

  • registering new repo by name has same output

  • interactive registration with selection has same output

  • re-registering an already registered repo

$ # main
$ minder repo register -n blkt/actix
Repository blkt/actix is already registered

$ # dev
$ minder-dev repo register -n blkt/actix
Repository blkt/actix is already registered
+No repositories registered
  • interactive registration, no selection
$ # main
$ minder repo register
Found 3 remote repositories: 1 registered and 2 unregistered.
? Select repositories to register with Minder:

-Message: Error getting selected repositories
-Details: no repositories selected

$ # dev
$ minder-dev repo register
Found 3 remote repositories: 2 registered and 1 unregistered.
? Select repositories to register with Minder:

+No repositories selected
+No repositories registered
  • interactive registration, no repos left
$ # main
$ minder repo register
-Found 3 remote repositories: 3 registered and 0 unregistered.
-Message: Error getting selected repositories
-Details: no repositories found

$ # dev
$ minder-dev repo register
+No repos left to register

Despite the fact that some differences seem to be adding redundant messages, the flow is much more flat than before.

@coveralls
Copy link

coveralls commented May 7, 2024

Coverage Status

coverage: 50.308% (-0.006%) from 50.314%
when pulling 422fb2f on issue-2627-cli
into 010b8b9 on main.

@blkt blkt marked this pull request as ready for review May 7, 2024 12:56
@blkt blkt requested a review from a team as a code owner May 7, 2024 12:56
@blkt blkt linked an issue May 7, 2024 that may be closed by this pull request
When registering a new repo, Minder CLI now filters available repos
via the newly available "registered" flag in UpstreamRepositoryRef
struct, while previously, it achieved the same behviour by issuing two calls
to the backend.

Abstract behaviour is the same, although some messages changed.
@blkt blkt merged commit bda5832 into main May 8, 2024
19 of 20 checks passed
@blkt blkt deleted the issue-2627-cli branch May 8, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants