Skip to content

Commit

Permalink
Update pull_request_template.md and documentation
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Storz <philipp.storz@bareos.com>
  • Loading branch information
joergsteffens and pstorz committed Sep 9, 2022
1 parent 8b651fd commit 114da95
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 7 deletions.
57 changes: 53 additions & 4 deletions docs/manuals/source/DeveloperGuide/gitworkflow.rst
Expand Up @@ -6,13 +6,44 @@ Git Workflow
Getting new code or changes into Bareos
---------------------------------------
All new code should be targeted at our master branch.
There are no exceptions, so even if you fix a bug in an ancient release, you fix it in master.
There are no exceptions, so even if you fix a bug in an ancient release,
you fix it in master.
You can then backport your changes to an older release.
The Git workflow we use is `Github Flow`_.

Basically this means we want you to create pull requests against our master branch.
We will then build and review the code, request changes as required and eventually merge the pull request.
You may need to rebase and force-push during the review-phase as master is a moving target.
Basically this means we want you to create pull requests (PR) against our master branch.
The pull request title will later be used as a line to the CHANGELOG file.
We will then build and review the code,
request changes as required and eventually merge the pull request.

During the review-phase
only additional commits and normal-pushes (avoid force pushes) should be used
if not otherwise agreed with the reviewer.
After the pull request is approved, a final rebase and squashing of commits can and should be done.

Also note, that a conversation started by a reviewer should also be resolved by the reviewer.

To summarize:

* You: create a PR.

* The PR title should be usable as CHANGELOG entry.

* Bareos Dev team: will assign a reviewer to the PR.
* Reviewer: review phase:

* until Reviewer is satisfied:

* Reviewer: reviews the PR, make suggestions (with comments, sometimes with additional commits).
* You: address the suggestions by additional commits (or comments).

* When the reviewer is satisfied with the changes, often a final step is required:

* You: rebase the git branch and cleanup (squash) the commits.
* You (or the Reviewer): create a separate commit for the CHANGELOG entry, see :ref:`section-Changelog`.

* Reviewer: approves the PR and someone from Bareos will merge it.


.. _Github Flow: https://docs.github.com/en/get-started/quickstart/github-flow

Expand Down Expand Up @@ -79,3 +110,21 @@ It should be wrapped at 72 chars and can consist of multiple paragraphs separate
- bugfix info for the bugtracker
- imperative language
- hard limit of 72 characters in the long description

.. _section-Changelog:

CHANGELOG
---------

Each pull-request (PR) should add an entry in the https://github.com/bareos/bareos/blob/master/CHANGELOG.md file of your branch.
The title of the PR should be usable as the CHANGELOG entry.

The entry in the CHANGELOG.md file should

* be in a separate commit.
* refers to the PR.
* be added at the bottom of the relevant section.

The commit message should be: ``update CHANGELOG.md``

Normally the CHANGELOG commit will be added as the last step in the review process to minimize the number of conflicts.
8 changes: 5 additions & 3 deletions pull_request_template.md
@@ -1,5 +1,7 @@
### Thank you for contributing to the Bareos Project!

**Backport of PR #0000 to bareos-2x** (remove this line, if it no backport)

#### Please check

- [ ] Short description and the purpose of this PR is present _above this paragraph_
Expand All @@ -19,9 +21,10 @@ If you have any questions or problems, please give a comment in the PR.
##### General
- [ ] PR name is meaningful
- [ ] Purpose of the PR is understood
- [ ] Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
- [ ] Commit descriptions are understandable and well formatted
- [ ] If backport: add original PR number and target branch at top of this file: **Backport of PR#000 to bareos-2x**
- [ ] Check backport line
- [ ] Is the PR title usable as CHANGELOG entry?
- [ ] Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.

##### Source code quality

Expand All @@ -30,7 +33,6 @@ If you have any questions or problems, please give a comment in the PR.
- [ ] Code comments are correct (logically and spelling)
- [ ] Required documentation changes are present and part of the PR
- [ ] `bareos-check-sources --since-merge` does not report any problems
- [ ] `git status` should not report modifications in the source tree after building and testing

##### Tests

Expand Down

0 comments on commit 114da95

Please sign in to comment.