Skip to content

Commit 0cd1b1c

Browse files
committed
Update the workflow sections
This commit updates the pull request sections to detail the new pull request template.
1 parent 2915dee commit 0cd1b1c

File tree

1 file changed

+103
-44
lines changed

1 file changed

+103
-44
lines changed

docs/reference/contributing/guidelines/workflow.md

Lines changed: 103 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -61,90 +61,142 @@ If commits do not follow the above guidelines, we may request that you modify th
6161

6262
[How We Release Arm Mbed OS](../introduction/how-we-release-arm-mbed-os.html) explains Mbed OS versioning.
6363

64-
## Pull request types
64+
## Pull request template
6565

66-
We consider the following pull request types.
66+
The following template is automatically provided on the raising of a pull request against mbed-os.
67+
The details required will depend on the type of pull request being raised. See below for a more detailed
68+
explanation of the requirements.
6769

68-
### Fix
70+
### Description (*required*)
6971

70-
A bug fix is a change that fixes a specific defect in the codebase with backward compatibility. These are the highest priority because of the positive effect the change will have on users developing against the same code. A bug fix should be limited to restoring the documented or proven otherwise, originally intended behavior. Every bug fix should contain a test to verify results before and after the pull request. Bug fixes are candidates for patch releases. Large, nontrivial bug fixes approaching the size of refactors run the risk of being considered refactors themselves.
72+
##### Summary of change (*What the change is for and why*)
7173

72-
Release: patch
7374

74-
### Refactor
75+
##### Documentation (*Details of any document updates required*)
7576

76-
A refactor is a contribution that modifies the codebase without fixing a bug or changing the existing behavior. Examples of this are moving functions or variables between translation units, renaming source files or folders, scope modification for nonpublic code, documentation structure changes and test organization changes. There is always the risk that someone depended on the location or name before a refactor; therefore, these are lower in priority than bug fixes and might require detailed justification for the change. Refactors are candidates for feature releases.
7777

78-
Release: feature
78+
----------------------------------------------------------------------------------------------------------------
79+
### Pull request type (*required*)
7980

80-
### Target update
81+
[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
82+
[] Feature update (New feature / Functionality change / New API)
83+
[] Major update (Breaking change E.g. Return code change / API behaviour change)
8184

82-
Updating target implementation (adding a new target or updating already supported target) is a change for a patch release.
85+
----------------------------------------------------------------------------------------------------------------
86+
### Test results (*required*)
8387

84-
A test report for the new target must be part of the pull request. The new target must pass all Mbed OS functional and system validation tests (using `mbed test` command) for the current Mbed OS major release, including all Mbed OS supported toolchains.
88+
[] No Tests required for this change (E.g docs only update)
89+
[] Covered by existing mbed-os tests (Greentea or Unittest)
90+
[] Tests / results supplied as part of this PR
91+
92+
93+
----------------------------------------------------------------------------------------------------------------
94+
### Reviewers (*optional*)
8595

86-
Release: patch
8796

88-
### Functionality change
97+
----------------------------------------------------------------------------------------------------------------
98+
### Release Notes (*required for feature/major PRs*)
8999

90-
A functionality change can be any change in the functionality, including adding a new feature, a new method or a function. Software language does not matter.
91100

92-
A feature contribution contains a new API, capability or behavior. It does not break backward compatibility with existing APIs, capabilities or behaviors. New feature contributions are very welcome in Mbed OS. However, because they add capability to the codebase, a new feature may introduce bugs and a support burden. New features should also come with documentation, support for most targets and comprehensive test coverage. Feature PRs are treated cautiously, and new features require a new minor version for the codebase. Features are candidates for feature releases.
101+
##### Summary of changes
93102

94-
Every pull request changing or adding functionality must contain a "Release notes" section describing the changes to users.
103+
##### Impact of changes
95104

96-
It must contain:
105+
##### Migration actions required
97106

98-
- A brief description of changes introduced, including justification.
99-
- An analysis of effects: components affected and potential consequences for users.
100-
- Migration guidance: actions for updating the current code. Please include code snippets to illustrate before and after the addition or change.
101107

102-
<span class="notes">**Note:** We may use this content in our official release notes.</span>
108+
### Description field
103109

104-
For more details, please see the [pull request template addition for functional changes](#pull-request-template-functional-changes).
110+
There are two parts to the description, both of which are required.
111+
The first is a summary of the pull request. This should clearly state the reason for the PR and what
112+
the changes entail. The second part requires the author to state what, if any, documentation changes
113+
also need to be made to accompany the changes.
105114

106-
We initially implement new features on separate branches in the Mbed OS repository. Mbed OS maintainers create the new branches by following the naming convention: "feature-" prefix.
115+
### Pull request type
107116

108-
Each feature has a tech lead. This person is responsible for:
117+
There are three pull request types and these correspond to the 3 main categories specified in semantic versionning, Patch, Feature (Minor) and Major.
109118

110-
- Rebasing often to track master development.
111-
- Reviewing any addition to the feature branch (approval required by the feature tech lead or another assigned person).
119+
#### Patch update
112120

113-
Release: feature
121+
This can contain any of the following changes:
114122

115-
### Documentation update
123+
##### Bug Fix
116124

117-
Documentation updates include changes to markdown files or Doxygen documentation (comment-only changes).
125+
A bug fix is a change that fixes a specific defect in the codebase with backward compatibility. These are the highest priority because of the positive effect the change will have on users developing against the same code. A bug fix should be limited to restoring the documented or proven otherwise, originally intended behavior. Every bug fix should contain a test to verify results before and after the pull request. Bug fixes are candidates for patch releases. Large, nontrivial bug fixes approaching the size of refactors run the risk of being considered refactors themselves.
126+
127+
##### Refactor
128+
129+
A refactor is a contribution that modifies the codebase without fixing a bug or changing the existing behavior. Examples of this are moving functions or variables between translation units, renaming source files or folders, scope modification for nonpublic code, documentation structure changes and test organization changes. There is always the risk that someone depended on the location or name before a refactor; therefore, these are lower in priority than bug fixes and might require detailed justification for the change. Refactors are candidates for feature releases.
130+
131+
##### Target update
132+
133+
Updating target implementation (adding a new target or updating already supported target) is a change for a patch release.
134+
135+
A test report for the new target must be part of the pull request. The new target must pass all Mbed OS functional and system validation tests (using `mbed test` command) for the current Mbed OS major release, including all Mbed OS supported toolchains.
136+
137+
##### Documentation update
118138

119-
Release: patch
139+
Documentation updates include changes to markdown files or Doxygen documentation (comment-only changes).
120140

121-
### Test update
141+
##### Test update
122142

123143
Test updates include updates to a new test unit or test case.
124144

125-
Release: patch
145+
#### Feature update
146+
147+
This can be any change in the functionality, including adding a new feature, a new method or a function. Software language does not matter.
148+
149+
A feature contribution contains a new API, capability or behavior. It does not break backward compatibility with existing APIs, capabilities or behaviors. New feature contributions are very welcome in Mbed OS. However, because they add capability to the codebase, a new feature may introduce bugs and a support burden. New features should also come with documentation, support for most targets and comprehensive test coverage. Feature PRs are treated cautiously, and new features require a new minor version for the codebase. Features are candidates for feature releases.
150+
151+
We initially implement new features on separate branches in the Mbed OS repository. Mbed OS maintainers or
152+
tech leads may create the new branches by following the naming convention: "feature-" prefix.
153+
Each
154+
Each feature has a tech lead. This person is responsible for:
126155

127-
### Breaking change
156+
- Rebasing often to track master development.
157+
- Reviewing any addition to the feature branch (approval required by the feature tech lead or another assigned person).
128158

129-
A breaking change is any change that results in breaking user space. It should have strong justification for us to consider it. Often, such changes can be backward compatible, for example, deprecating the old functionality and introducing the new replacement.
159+
#### Major update
160+
161+
This is for breaking changes and should be rare. A breaking change is any change that results in breaking user space. It should have strong justification for us to consider it. Often, such changes can be backward compatible, for example, deprecating the old functionality and introducing the new replacement.
130162

131163
A contribution containing a breaking change is the most difficult PR to get merged. Any breaking changes in a codebase can have a large negative impact on any users of the codebase. Breaking changes are always limited to a major version release.
132164

133-
Every pull request with breaking change must contain a release notes section called "Release notes" to describe the changes to users.
165+
A project technical lead and the Mbed OS technical lead must approve breaking change pull requests.
134166

135-
It must contain:
136167

137-
- A brief description of changes introduced, including justification description.
138-
- An analysis of effects: components affected, potential consequences for users.
139-
- Migration guidance: actions for updating the current code. Please include code snippets to illustrate before and after the addition or change.
168+
### Test results
140169

141-
<span class="notes">**Note:** We may use this content in our official release notes.</span>
170+
This section is to indicate what test results if any are required for the PR.
171+
The three options are :
172+
* No Tests required for this change (E.g docs only update)
173+
* Changes will be tested by existing mbed-os tests (Greentea or Unittest)
174+
* Tests / results will supplied as part of this PR. For this option the test results and/or tests
175+
should be posted in this section below the tick boxes.
176+
177+
### Reviewers
142178

143-
Please see the [Pull request template](../contributing/workflow.html#pull-request-template-breaking-changes).
179+
Reviewers are automatically added by a bot based on the files that are actually changed, however this section
180+
gives the author the option to specify additional, specific reviewers. Required reviewers should be tagged here. E.g. @adbridge, @0xc0170
144181

145-
A project technical lead and the Mbed OS technical lead must approve breaking change pull requests.
146182

147-
Release: major
183+
### Release Notes
184+
185+
Every pull request changing or adding functionality must fill in the "Release notes" section. Consequently
186+
this applies to feature and major PRs. For both these types the 'Summary of changes' section must be
187+
completed. This should provide a brief description of changes introduced, including justification.
188+
189+
For major PRs is is also compulsory to complete the 'Impact of changes' and 'Migration actions required'.
190+
191+
The impact of changes must contain an analysis of effects: components affected and potential consequences for users.
192+
193+
The migration actions required should describe how to migrate from a previous version of the code being
194+
changed to the new version. Please include code snippets to illustrate before and after the addition or
195+
change.
196+
197+
The release notes section is automatically pulled into the overall release notes for a feature or major
198+
release and this should be considered when writing the entries.
199+
148200

149201
## GitHub pull requests workflow
150202

@@ -196,7 +248,14 @@ When we merge a pull request that we will publish in a patch release, we tag it
196248

197249
The release tag has the following format:
198250

199-
*release-version: 5.f.p* - Where `f` is the feature release and `p` the patch release.
251+
*release-version: m.f.p* Where:
252+
253+
* `m` is the major release
254+
* `f` is the feature release
255+
* `p` is the patch release.
256+
257+
From time to time there may be additional suffixes added which could represent a release candidate or
258+
alpha/beta release etc
200259

201260
## Additional labels
202261

0 commit comments

Comments
 (0)