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 make registry.json command #347

Merged
merged 5 commits into from
Jul 17, 2023
Merged

Add make registry.json command #347

merged 5 commits into from
Jul 17, 2023

Conversation

hculea
Copy link
Member

@hculea hculea commented Jul 10, 2023

Overview

This PR adds a make registry.json command, generating a json-formatted registry.

For the time being, this will be used as configuration for the Shell Plugins banners that OPH renders for Shell Plugins items. However, this can also serve as boilerplate for more complex configuration that can be built on top of this repo.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

How To Test

Run make registry.json

sdk/schema/plugin.go Outdated Show resolved Hide resolved
@accraw
Copy link
Contributor

accraw commented Jul 11, 2023

Functional test, check!

Should we add plugins/registry.json to .gitignore?

@accraw
Copy link
Contributor

accraw commented Jul 11, 2023

Do you think it might make sense to include the name of the executable? For example, I would be more likely to name my cred for Oh Dear ohdear and not have the management url.

Copy link
Contributor

@arunsathiya arunsathiya left a comment

Choose a reason for hiding this comment

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

This looks good to me! A couple of questions for consideration:

  • Should we support multiple credentials in the registry? When in the future multiple credentials are supported, we'd want to record separate management URLs for them. One example is ngrok: right now the authtoken and API Key are bundled together as one credential, but it'd be ideal to have them as individual credentials.
  • For shell plugins without a management URL, are we directing to the docs page?

Copy link
Contributor

@arunsathiya arunsathiya left a comment

Choose a reason for hiding this comment

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

Not necessarily questions but some drive-by thought processes:

Multi-executable shell plugins, and shell plugins that depend on other company secrets. Homebrew is an example of the latter, which uses GitHub Personal Access Tokens for authentication.

If we are doing pattern matching based on the platform name, for example, should we show only the GitHub shell plugin (on the banner) on a GitHub secret, or show the Homebrew shell plugin as well?

If we are pattern matching with the URL in the secret item, should we show both GitHub and Homebrew shell plugins in that banner? If we choose to show more than one, will that constraint what we can show within that banner?

@hculea
Copy link
Member Author

hculea commented Jul 13, 2023

Added to .gitignore, thanks @accraw !

Do you think it might make sense to include the name of the executable? For example, I would be more likely to name my cred for Oh Dear ohdear and not have the management url.

I suggest we carry out this discussion on the internal MR where this json gets used, as the PR here lacks context about the current intended consumption mechanism for this json.

@hculea
Copy link
Member Author

hculea commented Jul 13, 2023

Should we support multiple credentials in the registry?

good point! I'll make sure to open an internal ticket about this. 😄

For shell plugins without a management URL, are we directing to the docs page?

https://developer.1password.com/docs/cli/shell-plugins/

@hculea hculea requested a review from arunsathiya July 17, 2023 10:25
Copy link
Contributor

@arunsathiya arunsathiya left a comment

Choose a reason for hiding this comment

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

Current changes look good to me!

Copy link
Contributor

@accraw accraw left a comment

Choose a reason for hiding this comment

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

Looks good to me for this iteration, can discuss improvements or other changes internally later.

@hculea hculea merged commit 7f78112 into main Jul 17, 2023
5 checks passed
@hculea hculea deleted the hculea/make-registry.json branch July 17, 2023 15:04
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.

3 participants