Skip to content

Commit

Permalink
Merge pull request #8895 from kenjis/imporve-contributing
Browse files Browse the repository at this point in the history
docs: imporve contributing
  • Loading branch information
kenjis authored May 16, 2024
2 parents 5eb9584 + 3f5aecc commit f927928
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
13 changes: 10 additions & 3 deletions contributing/pull_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,13 @@ working on your contribution.

### Branching

All bug fixes should be sent to the __"develop"__ branch, this is where the next
bug fix version will be developed.
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the
next bug fix version will be developed.
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.6"__

PRs with any enhancement should be sent to next minor version branch, e.g. __"4.6"__
> [!NOTE]
> If you sent your PR to the wrong branch, see
> [Contribution Workflow](./workflow.md#if-you-sent-to-the-wrong-branch).
The __"master"__ branch will always contain the latest stable version and is kept
clean so a "hotfix" (e.g. an emergency security patch) can be applied to the
Expand Down Expand Up @@ -235,6 +238,10 @@ This is *not* just a "signed-off-by" commit, but instead, a digitally signed one

See [Contribution signing](./signing.md) for details.

> [!NOTE]
> If you forgot GPG-signing your commits, see
> [Contribution Workflow](./workflow.md#gpg-signing-old-commits).
### Static Analysis on PHP code

We cannot, at all times, guarantee that all PHP code submitted on pull requests
Expand Down
28 changes: 14 additions & 14 deletions contributing/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ values for when you try these:

- All bug fix PRs should be sent to the __"develop"__ branch, this is where the
next bug fix version will be developed.
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.6"__

The "master" branch will always contain the latest stable
version and is kept clean so a "hotfix" (e.g: an emergency security
Expand Down Expand Up @@ -114,7 +114,7 @@ is optional, and implies a sort of namespacing if used.

- All bug fix PRs should be sent to the __"develop"__ branch, this is where the
next bug fix version will be developed.
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.6"__

For instance, if you send a PR to __"develop"__ branch, make sure you are in the
*develop* branch, and create a new bugfix branch, based on *develop*, for a new
Expand All @@ -126,11 +126,11 @@ feature you are creating:
```

If you send a PR with an enhancement, make sure you are in the *next minor version*
branch, and create a new feature branch, based on, e.g., __"4.5"__, for a new
branch, and create a new feature branch, based on, e.g., __"4.6"__, for a new
feature you are creating:

```console
> git switch 4.5
> git switch 4.6
> git switch -c new/mind-reader
```

Expand Down Expand Up @@ -283,7 +283,7 @@ switching to the branch you wish to contribute, and then clicking on
"New pull request".

Make sure the pull request is for the shared __"develop"__ or next minor version
branch, e.g. __"4.5"__, or it may be rejected.
branch, e.g. __"4.6"__, or it may be rejected.

Make sure that the PR title is helpful for the maintainers and other
developers. Add any comments appropriate, for instance asking for
Expand Down Expand Up @@ -324,7 +324,7 @@ And if your PRs have the breaking changes, label the following label:
If you are asked for changes in the review, commit the fix in your branch and
push it to GitHub again.

If the __"develop"__ or next minor version branch, e.g. __"4.5"__, progresses
If the __"develop"__ or next minor version branch, e.g. __"4.6"__, progresses
and conflicts arise that prevent merging, or if you are asked to *rebase*,
do the following:

Expand Down Expand Up @@ -364,7 +364,7 @@ And finally push your local branch to your GitHub repository:

If you have sent a PR to the wrong branch, you need to create a new PR branch.

When you have the PR branch `feat-abc` and you should have sent the PR to __"4.5"__,
When you have the PR branch `feat-abc` and you should have sent the PR to __"4.6"__,
but you created the PR branch from `develop` and sent a PR.

Copy the IDs of any commits you made that you want to keep:
Expand All @@ -373,13 +373,13 @@ Copy the IDs of any commits you made that you want to keep:
> git log
```

Update your __"4.5"__ branch:
Update your __"4.6"__ branch:

```console
> git fetch upstream
> git switch 4.5
> git merge upstream/4.5
> git push origin 4.5
> git switch 4.6
> git merge upstream/4.6
> git push origin 4.6
```

(Optional) Create a new branch as a backup, just in case:
Expand All @@ -388,10 +388,10 @@ Update your __"4.5"__ branch:
> git branch feat-abc.bk feat-abc
```

Rebase your PR branch from `develop` onto __"4.5"__:
Rebase your PR branch from `develop` onto __"4.6"__:

```console
> git rebase --onto 4.5 develop feat-abc
> git rebase --onto 4.6 develop feat-abc
```

Force push.
Expand All @@ -400,7 +400,7 @@ Force push.
> git push --force-with-lease origin feat-abc
```

On the GitHub PR page, change the base branch to the correct branch __"4.5"__.
On the GitHub PR page, change the base branch to the correct branch __"4.6"__.

## Cleanup

Expand Down

0 comments on commit f927928

Please sign in to comment.