Skip to content

Formal Requirements of Pull Requests

RealCLanger edited this page Oct 23, 2018 · 11 revisions

SapMachine pull requests must fulfil formal requirements before they can be merged. These formal requirements are checked by the SapMachine Bot.

SapMachine Only Changes

For changes that are SapMachine only, an issue must be created first. Describe the bug that shall be fixed or the feature that shall be implemented in there.

The pull request must reference this issue in the description. The issue is referenced with a fixes #Issue. This reference must be the last line of the description.

Example

<This is an optional description of the pull request.>

fixes #1234

When the pull request is merged, we want to see only one commit in the SapMachine target branch. It must be of the following format:

SapMachine #Issue: Issue Title
More description goes into the next lines.

The commit must reference the issue, that was created for this pull request. The first line of the commit must also contain the issue title.

Example:

SapMachine #1234: Fix the build an ship it

This is a more detailed description
of the fix I have done.

Unfortunately, GitHub provides no means for checking the commits when merging, so the person that does the merge has to take special care that the format is correct.

If the pull request contains only one commit that already has a correct message, you can chose the merge strategy "rebase". This will apply the commit on top of the target branch via fast-forward. It can be that this does not work out, e.g. when the target branch has diverged from the time the pull request was created.

If the pull request contains multiple commits, the commit message of a single commit does not have the right format yet or rebasing via fast-forward is not possible, you might chose the strategy "squash". See the Git Help on how to do that. In that case you will get the possibility to edit the commit message in the WebUI.