-
Notifications
You must be signed in to change notification settings - Fork 349
Remove hub requirement from pull-requests documentation #586
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
Open
Copilot
wants to merge
3
commits into
main
Choose a base branch
from
copilot/remove-hub-requirement
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,19 +56,19 @@ If you haven't submitted a pull request before, you'll want to install WP-CLI fo | |
|
|
||
| ### Working on a specific command/package | ||
|
|
||
| 1. Install [Composer](https://getcomposer.org/) and [hub](https://hub.github.com/) if you don't already have them. | ||
| 2. Clone the git repository of the command/package you want to work on to your local machine. As an example for working on the `wp core` command: `hub clone wp-cli/core-command` | ||
| 3. Change into the cloned directory and fork WP-CLI: `cd core-command`. | ||
| 1. Install [Composer](https://getcomposer.org/) if you don't already have it. | ||
| 2. Clone the git repository of the command/package you want to work on to your local machine. As an example for working on the `wp core` command: `git clone https://github.com/wp-cli/core-command.git` | ||
| 3. Change into the cloned directory: `cd core-command` | ||
| 4. Install all Composer dependencies: `composer install` | ||
| 5. Verify WP-CLI was installed properly: `vendor/bin/wp --info` | ||
|
|
||
| Within this package, you should preferably use `vendor/bin/wp` to run the command. Just using `wp` should work as well, but by doing that you might run the command through a different version of the framework and thus getting an unexpected result. | ||
|
|
||
| ### Working on the project as a whole | ||
|
|
||
| 1. Install [Composer](https://getcomposer.org/) and [hub](https://hub.github.com/) if you don't already have them. | ||
| 1. Install [Composer](https://getcomposer.org/) if you don't already have it. | ||
| 2. Clone the WP-CLI git repository to your local machine: `git clone [email protected]:wp-cli/wp-cli.git ~/wp-cli` | ||
| 3. Change into the cloned directory and fork WP-CLI: `cd ~/wp-cli`. If you are going to work on the core framework itself, run `hub fork` here to create a pushable repository on GitHub. | ||
| 3. Change into the cloned directory: `cd ~/wp-cli`. If you are going to work on the core framework itself, fork the repository on GitHub through the web UI and add it as a remote: `git remote add fork [email protected]:yourusername/wp-cli.git` | ||
| 4. Install all Composer dependencies: `composer install --prefer-source` | ||
| 5. Alias the `wp` command to your new WP-CLI install: `alias wp='~/wp-cli/bin/wp'` | ||
| 6. Verify WP-CLI was installed properly: `wp --info` | ||
|
|
@@ -77,19 +77,22 @@ Commands bundled with WP-CLI (e.g. `wp scaffold plugin`) will be editable from t | |
|
|
||
| Commands available for standalone installation (e.g. `wp dist-archive`) can be installed from source (e.g. `wp package install [email protected]:wp-cli/dist-archive-command.git`). Run `wp package path <package-name>` to find the appropriate directory to edit. | ||
|
|
||
| Importantly, you'll need to fork each repository in order to have an `origin` to push to. Run `hub fork` to fork a repository from the command-line: | ||
| Importantly, you'll need to fork each repository in order to have a remote to push to. For each repository you want to contribute to: | ||
|
|
||
| 1. Fork the repository on GitHub through the web UI | ||
| 2. Add your fork as a remote: | ||
|
|
||
| $ cd vendor/wp-cli/scaffold-command | ||
| $ hub fork | ||
| Updating danielbachhuber | ||
| From https://github.com/wp-cli/scaffold-command | ||
| * [new branch] master -> danielbachhuber/master | ||
| new remote: danielbachhuber | ||
| $ git remote add fork [email protected]:yourusername/scaffold-command.git | ||
| $ git remote -v | ||
| danielbachhuber [email protected]:danielbachhuber/scaffold-command.git (fetch) | ||
| danielbachhuber [email protected]:danielbachhuber/scaffold-command.git (push) | ||
| origin https://github.com/wp-cli/scaffold-command.git (fetch) | ||
| origin https://github.com/wp-cli/scaffold-command.git (push) | ||
| fork [email protected]:yourusername/scaffold-command.git (fetch) | ||
| fork [email protected]:yourusername/scaffold-command.git (push) | ||
|
|
||
| Once you've done so, you'll have a fork in your GitHub account and a new remote you can push to. You can then push changes to your fork with `git push fork branch-name`. | ||
|
|
||
| Once you've done so, you'll have a fork in your GitHub account and new remote you can push to. If you didn't install `hub`, you'll need to fork the target repo through the web UI and manually add your fork as a remote. | ||
| **Optional:** The [GitHub CLI (`gh`)](https://cli.github.com/) can help streamline some of these tasks, such as forking repositories and creating pull requests from the command line. | ||
|
|
||
| ## Running and writing tests | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swissspidy We need describe it in more details or link to GitHub documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot add such a link please