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

Add Command to List Plugins in a Remote Repository #200

Merged
merged 3 commits into from
Oct 3, 2023

Conversation

tareknaser
Copy link
Collaborator

Description

This pull request introduces a new command to coffee, allowing users to list plugins in a remote repository.

Example:

To list plugins in a remote repository, simply run:

coffee remote <repository_name> --plugins

Changes

  • Added a new HTTP endpoint to handle the command.
  • Implemented test cases to ensure the functionality is reliable.
  • Documented the new command and its usage.

@netlify
Copy link

netlify bot commented Oct 1, 2023

Deploy Preview for coffee-docs canceled.

Name Link
🔨 Latest commit d39fa6f
🔍 Latest deploy log https://app.netlify.com/sites/coffee-docs/deploys/651b0da4b4ef120008f750a7

@tareknaser tareknaser marked this pull request as ready for review October 1, 2023 12:21
@vincenzopalazzo
Copy link
Contributor

What happens if I do not specify --plugins?

@tareknaser
Copy link
Collaborator Author

What happens if I do not specify --plugins?

fails, clap handles that because of requires here

#[arg(short, long, action = clap::ArgAction::SetTrue, requires = "remote-name")]
plugins: bool,
#[arg(
    requires = "plugins",
    name = "remote-name",
    help = "The name of the remote repository"
)]
name: Option<String>,

the output is

% coffee remote lightningd          
error: the following required arguments were not provided:
  --plugins

Usage: coffee remote --plugins <remote-name>

For more information, try '--help'.

@vincenzopalazzo
Copy link
Contributor

vincenzopalazzo commented Oct 2, 2023

fails, clap handles that because of requires here

Without a flag, we can print the information about the repository.

We already do it inside the coffee remote list, maybe we can return the same result but with one single item (that is the repository passed by name?

@vincenzopalazzo vincenzopalazzo self-assigned this Oct 2, 2023
@vincenzopalazzo vincenzopalazzo added this to the 0.1-rc1 milestone Oct 2, 2023
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

OK some very small suggestion change, but we are there.

Thanks

coffee_cmd/src/main.rs Outdated Show resolved Hide resolved
coffee_lib/src/plugin_manager.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@vincenzopalazzo vincenzopalazzo merged commit 2034f99 into coffee-tools:master Oct 3, 2023
8 checks passed
@tareknaser tareknaser deleted the remote-plugin-list branch October 3, 2023 09: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
Development

Successfully merging this pull request may close these issues.

2 participants