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

design thoughts #1

Open
crguezl opened this issue Apr 22, 2022 · 3 comments
Open

design thoughts #1

crguezl opened this issue Apr 22, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@crguezl
Copy link

crguezl commented Apr 22, 2022

State at 22/04/2022

gh org clone

  • search option is convenient

  • specific help for clone must be improved

    • fzf must be installed, what is going to happen, etc.

Some Commands to add

gh org cd ULL-ESIT-PL-2122

cd subcommand is needed.

May be fuzzy search with fzf and cache can improve efficiency

gh org cd PL-2122

wu¡ill find org ULL-ESIT-PL-2122

gh org pwd

gives the default org

Cache

May be we cache the orgs inside the config file and other things, but if we cache we need a gh org update command

Strategy Pattern

gh org install

Example: gh org install clone will install plugin in https://github.com/gh-cli-for-education/gh-org-clone

a variant of the command will be:

gh org install ggcristo/gh-org-clone

Configuration file

Stored in:

$HOME/.local/share/gh/extensions/gh-org/config.js

__dirname

module.exports = {
  defaultOrg: "ULL-ESIT-PL-2122",
  commands: {
     "clone" : { ... },
     "cd": { ...},
     "pwd": {... },
    ...
 },
  cache: {
        orgs: [. ... user orgs ... ]
   }
}
@crguezl crguezl added the enhancement New feature or request label Apr 22, 2022
@GGCristo
Copy link
Collaborator

GGCristo commented May 7, 2022

@crguezl
¿Deberíamos obligar a nuestros usuarios que sus plugins tengan el prefijo "gh-edu", a modo de namespace, o le damos total libertad y simplemente ponemos un warning?
Tener el prefijo gh-edu nos daría más seguridad de que el plug-in esté pensado para nuestro ecosistema, pero también podría limitarlo bastante

@crguezl
Copy link
Author

crguezl commented May 7, 2022

@GGCristo

Creo que es mejor que tengan el prefijo gh-edu. Creo que demuestra intencionalidad por parte del autor del plugin y la gente sabrá que ese espacio de nombres gh-edu esta reservado.

@crguezl
Copy link
Author

crguezl commented May 8, 2022

Checked that the strategy pattern seems to work. Installed gh-edu and then installed the plugin view without problems.

Looks wonderful!

More tests before closing this issue are needed though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants