Skip to content

Commit fd5d1df

Browse files
author
Pietro Grandi
committed
Fix as per revision
1 parent e5b644a commit fd5d1df

File tree

2 files changed

+34
-42
lines changed

2 files changed

+34
-42
lines changed

process/merge_requests/README.md

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
# Merge requests
22
## Introduction
33
Since introducing GitLab to our workflow, we've been using it as our primary
4-
tool for reviewing code.
5-
While issues still reside in Jira the actual merging, deploying, commenting
6-
and discussing code is handled through GitLab.
4+
tool for reviewing code. While issues still reside in JIRA the actual merging,
5+
deploying, commenting and discussing code is handled through GitLab.
76

87
## Prerequisite
98
The following instructions assume you have a working GitLab account. If you
109
don't yet have access to the web interface of GitLab, contact Operations.
1110

1211
## Lifecycle of a merge request
1312
### Creation procedure
14-
Let's assume you've worked on an issue enough to set the status to "Review",
13+
Let's assume you've worked on an issue enough to set the status to review,
1514
which would put it into the review's queue.
1615

17-
Before you set the status to "Review", make sure that there's a Merge Request
16+
Before you set the status to review, make sure that there's a Merge Request
1817
(henceforth referred to as "MR") available in GitLab.
1918

2019
These are the steps necessary:
@@ -27,49 +26,48 @@ These are the steps necessary:
2726
5. Click the green "New Merge Request" button, located in the top right part of
2827
the page.
2928
6. Here you'll need to provide the **source** branch and the **target** branch.
30-
The source branch should be the branch which you wish to have reviewed, while
31-
the target branch should be what you want to merge into.
32-
Unless you've been asked to set it to something else, you'll want the target
33-
branch to be set to `master`.
29+
The source branch should be the branch which you wish to have reviewed,
30+
while the target branch should be what you want to merge into. Unless
31+
you've been asked to set it to something else, you'll want the target branch
32+
to be set to `master`.
3433
7. Press the blue "Compare branches" button.
3534
8. Enter title and description, following the guidelines written in the
3635
**Title and Description guidelines** section.
37-
9. Set label "Ready for review".
38-
10. Assign it to another developer.
3936
9. At this point you can review the MR one final time before pressing the
4037
"Submit merge request" button.
4138

42-
This should take you to the page with the now created MR.
43-
All that is necessary from here is to **add a link to the MR in the Jira ticket**.
39+
This should take you to the page with the now created MR.
40+
41+
All that is necessary from here is to **add a link to the MR in the JIRA ticket**.
4442

4543
#### Title and Description guidelines
4644
The title should always look something like this:
4745

4846
#12345: Adjust constant in warpcore configuration to prevent overheating
4947

50-
Notice the issue number at the start, including the # character.
51-
Following the issue number should be general description of what the MR changes.
48+
Notice the issue number at the start, including the # character. Following the
49+
issue number should be general description of what the MR changes.
5250

5351
The description should include the following:
5452

55-
* A direct link to the Jira ticket, in the form of: `refs [#12345](https://jira.server/12345)`
56-
* What the MR changes, being a bit more descriptive than the title.
57-
* If there's something you're unsure of how it should be done, point this out so
53+
* A direct link to the JIRA ticket, in the form of: `refs [#12345](https://jira.server/12345)`
54+
* What the MR changes, being a bit more descriptive than the title. If there's
55+
* something you're unsure of how it should be done, point this out so
5856
that the reviewer can help you out.
5957
* If necessary, include information that would help the reviewer understand
6058
*why* you made certain changes. This information should already be present in
6159
the form of [well written commit messages](../../style/git), but it doesn't
6260
hurt including this in the MR description.
6361
* If there are parts of the changeset that can be ignored (you added a library
64-
to vendor, resulting in thousands of lines of code), you should point this out
65-
so the reviewer doesn't waste time sifting through vendor code.
62+
to vendor, resulting in thousands of lines of code), you should point this
63+
out so the reviewer doesn't waste time sifting through vendor code.
6664
* If the merge will require some additional deploy instructions, include these
6765
so that they too can be reviewed.
6866

6967

7068
### Working with merge requests
7169
#### Git
72-
The process of working and commiting when working in conjunction with MRs
70+
The process of working and committing when working in conjunction with MRs
7371
doesn't differ much from how work has been handled when we only used Redmine,
7472
but there's one major difference:
7573

@@ -81,13 +79,12 @@ What does this mean?
8179
Let's say you've submitted your MR and the reviewer wants you to change
8280
something in a previous commit.
8381

84-
If you previously had the habit of creating
85-
a commit, rebasing and squashing right away: refrain from doing so. The
86-
preferred way of doing things in this system [is to create fixup commits][fixup]
87-
that are squashed at the very end of the life cycle of the MR, so pretty much
88-
when the reviewer approves the MR for merging.
89-
The rebase process would be done by the author when asked from the reviewer, depending
90-
on the MR's complexity.
82+
If you previously had the habit of creating a commit, rebasing and squashing
83+
right away: refrain from doing so. The preferred way of doing things in this
84+
system [is to create fixup commits][fixup] that are squashed at the very end of
85+
the life cycle of the MR, so pretty much when the reviewer approves the MR for
86+
merging. The rebase process would be done by the author when asked from the
87+
reviewer, depending on the MR's complexity.
9188

9289
[fixup]: http://fle.github.io/git-tip-keep-your-branch-clean-with-fixup-and-autosquash.html
9390

@@ -97,8 +94,8 @@ If there's no need to rewrite history, for instance if you start adding new
9794
features after the MR is submitted, just keep working as you always have.
9895

9996
#### The merge request interface
100-
If you make an adjustment (e.g. to address a comment that was left by
101-
a reviewer) and push the resulting code, this will immediately be reflected in
97+
If you make an adjustment (e.g. to address a comment that was left by a
98+
reviewer) and push the resulting code, this will immediately be reflected in
10299
the MR. This way, the reviewer will always see the latest version of the branch
103100
in the MR.
104101

@@ -117,17 +114,12 @@ become easier to if you surround it with backticks.
117114
[GFMD]: http://doc.gitlab.com/ce/markdown/markdown.html
118115

119116
### Closing a merge request
120-
When the reviewer considers the code ready to merge, he'll say so, and a label
121-
with the name `Ready for release` will be applied, indicating that the branch is
122-
ready to merge and deploy.
123-
It's up to the reviewer applying the label and unassigning the MR.
124-
125117
Do not close the MR, it will be closed automatically when the branch is merged
126118
into `next` (or whatever other branch was set as the target branch).
127119

128120
## Finding merge requests
129121
As stated at the end of the "Creation procedure" section, if an issue in
130-
Jira has code that should be reviewed, a link to the corresponding MR in
122+
JIRA has code that should be reviewed, a link to the corresponding MR in
131123
GitLab *must* be posted. This link will probably be the easiest way to find the
132124
MR in GitLab.
133125

style/git/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
### Content
55
The commit message serves to provide a technical description of the change
66
introduced by its commit. It should be possible to look at a commit message in
7-
combination with its diff and quickly understand **what** was changed **where**,
8-
**how** it was changed and **why**. Simple changes sometimes speak for
9-
themselves. Complex changes need more explanation.
7+
combination with its diff and quickly understand **what** was changed
8+
**where**, **how** it was changed and **why**. Simple changes sometimes speak
9+
for themselves. Complex changes need more explanation.
1010

1111
* Commits are a form of documentation
1212
* Time spent writing costs less than the time spent reading
@@ -31,7 +31,7 @@ The commit message body describes the current state (**why**):
3131
* Use present tense, e.g. "Foo does not work"
3232
* Avoid past tense, e.g. "Foo did not work"
3333

34-
It describes what the the commit does to change the current state (**what**):
34+
It describes what the commit does to change the current state (**what**):
3535

3636
* Match the subject and use imperative mood "Fix foo by doing bar"
3737
* Or use a descriptive tone "This fixes foo by doing bar"
@@ -118,12 +118,12 @@ Furthermore:
118118
commit.
119119

120120
## Branches
121-
1. Branch `next` contains the latest stable release
121+
1. Branch `master` contains the latest stable release
122122
2. Integration branches are namespaced `integration/`
123123
3. Individual words in branch names are separated by hyphen-minus (`-`)
124124

125125
### Personal branches
126-
1. Personal branches are namespaced `<name>/` where `<name>` is your firstname
126+
1. Personal branches are namespaced `<name>/` where `<name>` is your first name
127127
or known nickname.
128128
2. It is a good idea to push even unfinished work to your personal namespace
129129
frequently.

0 commit comments

Comments
 (0)