mirror of https://github.com/streamlink/streamlink
docs: rewrite "pull requests" guide
This commit is contained in:
parent
3c496eea91
commit
525ad6b501
|
@ -71,27 +71,31 @@ Plugins which fall under the following categories will not be implemented or con
|
|||
|
||||
11. Sites which are static cameras of a physical location
|
||||
|
||||
|
||||
## Pull requests
|
||||
|
||||
Good pull requests - patches, improvements, and new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
|
||||
|
||||
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
|
||||
**Please ask first** before embarking on any significant pull request, for example:
|
||||
|
||||
Please adhere to the coding conventions used throughout a project (indentation, white space, accurate comments, etc.) and any other requirements (such as test coverage).
|
||||
- implementing features
|
||||
- adding new plugins
|
||||
- refactoring code
|
||||
|
||||
Otherwise, you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
|
||||
|
||||
Please adhere to the coding conventions used throughout a project (i.e. indentation, white space, accurate comments) and any other requirements, such as test coverage.
|
||||
|
||||
Adhering to the following process is the best way to get your work included in the project:
|
||||
|
||||
1. [Fork][howto-fork] the project, clone your fork, and configure the remotes:
|
||||
```bash
|
||||
# Clone your fork of the repo into the current directory
|
||||
git clone git@github.com:<YOUR-USERNAME>/streamlink.git
|
||||
# Navigate to the newly cloned directory
|
||||
git clone git@github.com:YOUR-USERNAME/streamlink.git
|
||||
cd streamlink
|
||||
# Assign the original repo to a remote called "upstream"
|
||||
git remote add upstream https://github.com/streamlink/streamlink.git
|
||||
```
|
||||
|
||||
2. If you cloned a while ago, get the latest changes from upstream
|
||||
2. If you cloned a while ago, get the latest changes from upstream:
|
||||
```bash
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
|
@ -99,23 +103,32 @@ Adhering to the following process is the best way to get your work included in t
|
|||
|
||||
3. Create a new topic branch (off the main project branch) to contain your feature, change, or fix:
|
||||
```bash
|
||||
git checkout -b <TOPIC-BRANCH-NAME>
|
||||
git checkout -b TOPIC-BRANCH-NAME
|
||||
```
|
||||
|
||||
4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines][howto-format-commits] or your code is unlikely be merged into the project. Use git's [interactive rebase][howto-rebase] feature to tidy up your commits before making them public.
|
||||
|
||||
5. Locally merge (or rebase) the upstream branch into your topic branch:
|
||||
5. If your topic branch is based off an outdated commit on the master branch, then rebase first:
|
||||
```bash
|
||||
git pull [--rebase] upstream master
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
git checkout TOPIC-BRANCH-NAME
|
||||
git rebase --interactive master
|
||||
```
|
||||
|
||||
6. Push your topic branch up to your fork:
|
||||
```bash
|
||||
git push origin <TOPIC-BRANCH-NAME>
|
||||
git push origin TOPIC-BRANCH-NAME
|
||||
```
|
||||
|
||||
7. [Open a Pull Request][howto-open-pull-requests] with a clear title and description.
|
||||
|
||||
8. After rebasing or making amending commits, force-push the branch to your fork:
|
||||
```bash
|
||||
git rebase --interactive master
|
||||
git push --force origin TOPIC-BRANCH-NAME
|
||||
```
|
||||
|
||||
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to license your work
|
||||
under the terms of the [BSD 2-clause license][license].
|
||||
|
||||
|
|
Loading…
Reference in New Issue