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

Remove "hub" requirement #461

Open
1 task done
salcode opened this issue Aug 24, 2023 · 2 comments
Open
1 task done

Remove "hub" requirement #461

salcode opened this issue Aug 24, 2023 · 2 comments

Comments

@salcode
Copy link
Contributor

salcode commented Aug 24, 2023

Feature Request

Currently, https://make.wordpress.org/cli/handbook/contributions/pull-requests/ indicates hub is a required tool

Install Composer and hub if you don’t already have them.

and some commands are hub specific, e.g.

hub clone wp-cli/core-command

Proposed Solution

Modify the language and example commands to use git commands directly, rather than hub.

Optionally, call out hub as a useful tool that can be used.

Possible Drawbacks

  1. Commands will be slightly more verbose.
  2. Will we need to differentiate between a HTTPS or SSH clone?
    git clone git@github.com:wp-cli/wp-cli.git ~/wp-cli
    
@danielbachhuber
Copy link
Member

@salcode Did you want to submit a PR for this?

@salcode
Copy link
Contributor Author

salcode commented Aug 31, 2023

I don't anticipate submitting a PR for this in the immediate future due to a combination of this change being more complex than I additionally identified and my current time limitations.

While I still think removing hub as a requirement is a good move to make and hope to ultimately revisit this, I understand if you want to close this issue for the time being.

Complexity of Removing hub

As I started writing up changes, I realized how powerful the hub tool is.

For example this line

run hub fork here to create a pushable repository on GitHub.

encompasses a lot of changes in a simple command. It is non-trivial to replace this line.

I still think we should remove hub as a dependency however it brings up the question of how to document this. Do we:

a. Expect a certain level of knowledge around using Git and remotes (e.g. "Create a fork of the repository and update your remote to push your changes to the newly forked repo")
b. Link to an external resource which explains how to fork a project and update your remote
c. Including all of the information about how to visit the GitHub repo (e.g. something like

  1. click the fork button
  2. copy the "clone" URL remote on the newly created fork
  3. go to your local install and run this command while substituting the new "clone" URL you copied

Why I Still Think We Should Remove Hub

While hub abstracts away all of these changes, this abstraction feels like a layer of "magic" that prevents the user from understanding what is going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants