Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
# How to contribute to Moodle HQ's CFPropertyList
1 efrain 2
 
3
Welcome to our ever-growing community :octocat:!
4
 
5
We are more than happy to accept external contributions to the project in the form of feedback, translations, bug reports, and even better, pull requests.
6
 
1441 ariadna 7
We present you here the guidelines to start contributing to this project.
1 efrain 8
 
9
# <a name="top"></a>Table of contents
10
 
11
- 1 [See what’s going on](#1)
12
    - 1.1 [Issue Dashboard](#1.1)
13
    - 1.2 [Pull Request Dashboard](#1.2)
14
- 2 [Assistance](#2)
15
    - 2.1 [Contact us](#2.1)
16
    - 2.2 [Customers Assistance](#2.2)
17
- 3 [Feature Requests](#3)
18
    - 3.1 [Requirement for a Feature Request](#3.1)
19
        - 3.1.1 [Major Feature Request](#3.1.1)
20
        - 3.1.2 [Minor Feature Request](#3.1.2)
21
    - 3.2 [Request a New Feature](#3.2)
22
- 4 [Submitting](#4)
23
    - 4.1 [How to Submit an Issue or Bugs](#4.1)
24
        - 4.1.1 [Check for Past Issues or Bugs](#4.1.1)
25
        - 4.1.2 [Try to Reproduce It!](#4.1.2)
26
        - 4.1.3 [Isolate the Problem](#4.1.3)
27
        - 4.1.4 [Information Needed for the Report](#4.1.4)
28
        - 4.1.5 [Submit an Issue](#4.1.5)
29
    - 4.2 [How to Create a Pull Request (PR)](#4.2)
30
        - 4.2.1 [Create a Branch and Naming it](#4.2.1)
31
        - 4.2.2 [Make Changes](#4.2.2)
32
        - 4.2.3 [Commit Your Changes](#4.2.3)
33
            - 4.2.3.1 [Rules to Follow](#4.2.3.1)
34
            - 4.2.3.2 [Commit Format](#4.2.3.2)
35
                - 4.2.3.2.1 [Header: Writing a `type`](#4.2.3.2.1)
36
                - 4.2.3.2.2 [Header: Writing the `(optional scope)`](#4.2.3.2.2 )
37
                - 4.2.3.2.3 [Header: Writing a `description`](#4.2.3.2.3)
1441 ariadna 38
                - 4.2.3.2.4 [Header Length](#4.2.3.2.4)
1 efrain 39
                - 4.2.3.2.5 [Writing the `optional body`](#4.2.3.2.5)
40
                - 4.2.3.2.6 [Writing the `optional footer`](#4.2.3.2.6)
41
            - 4.2.3.3 [Commit Examples](#4.2.3.3)
42
        - 4.2.4 [Push your Changes](#4.2.4)
43
        - 4.2.5 [Create a Pull Request](#4.2.5)
44
            - 4.2.5.1 [How to Write a Title for a Pull Request](#4.2.5.1)
45
            - 4.2.5.2 [Before Send a Pull Request](#4.2.5.2)
46
            - 4.2.5.3 [How We Check your Submission](#4.2.5.3)
47
                - 4.2.5.3.1 [Status Check](#4.2.5.3.1)
48
                - 4.2.5.3.2 [App/Bots List](#4.2.5.3.2)
49
        - 4.2.6 [How to proceed with suggestions](#4.2.6)
50
- 5 [What to do next?](#5)
51
- 6 [Coding Rules](#6)
52
 
53
# <a name="1"></a> 1. See what's going on! [:top:](#top)
54
 
55
## <a name="1.1"></a> 1.1 Issue Dashboard
1441 ariadna 56
If you want to know all the issues we're dealing with right now, take a look at our [Issue Dashboard](https://github.com/moodlehq/CFPropertyList/issues) and look for areas in which you can help.
1 efrain 57
 
58
 
59
## <a name="1.2"></a> 1.2 Pull Request Dashboard
1441 ariadna 60
If you want to give us a hand solving issues then great, take a look at our [Pull Request Dashboard](https://github.com/moodlehq/CFPropertyList/pulls) and check for an open or closed PR. We don’t want to duplicate efforts.
1 efrain 61
 
62
# <a name="2"></a> 2. Assistance [:top:](#top)
63
 
64
## <a name="2.1"></a> 2.1 Contact us
1441 ariadna 65
You can contact us through any of our channels, check our [Contact section](https://moodledev.io/general/channels)
1 efrain 66
 
67
# <a name="3"></a> 3. Feature Requests [:top:](#top)
68
 
69
## <a name="3.1"></a> 3.1 Requirement for a Feature Request
1441 ariadna 70
If you like to _implement_ a new feature please [submit an Issue](https://github.com/moodlehq/CFPropertyList/issues/new) with a proposal, so we can be sure it's relevant.
1 efrain 71
 
72
### <a name="3.1.1"></a> 3.1.1 Major Feature Request
1441 ariadna 73
For a major new feature request, [open an Issue](https://github.com/moodlehq/CFPropertyList/issues/new) and outline your proposal so it can be discussed.
1 efrain 74
 
75
### <a name="3.1.2"></a> 3.1.2 Minor Feature Request
1441 ariadna 76
For a minor new feature request, you can craft it and directly [submit it as a Pull Request](https://github.com/moodlehq/CFPropertyList/pulls), we'll take care of it.
1 efrain 77
 
78
## <a name="3.2"></a> 3.2 Request a New Feature
1441 ariadna 79
You can request a new feature by [submitting an Issue](https://github.com/moodlehq/CFPropertyList/issues/new)
1 efrain 80
 
81
# <a name="4"></a> 4. Submitting [:top:](#top)
82
 
83
## <a name="4.1"></a> 4.1 How to Submit an Issue or Bugs
84
 
85
A good Issue/Bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
86
 
87
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful, here are steps to follow to build a good one:
88
 
89
### <a name="4.1.1"></a> 4.1.1 Check for Past Issues or Bugs
1441 ariadna 90
Before submitting the issue please check the [Issue Tracker](https://github.com/moodlehq/CFPropertyList/issues/), maybe the issue/bug was already reported by another contributor. By doing this you help us maximize the effort spent on solving problems and the addition of new features.
1 efrain 91
 
92
### <a name="4.1.2"></a> 4.1.2 Try to Reproduce It!
1441 ariadna 93
Try to reproduce this issue/bug using the latest `develop` branch in the repository [Check it here](https://github.com/moodlehq/CFPropertyList/branches).
1 efrain 94
 
95
### <a name="4.1.3"></a> 4.1.3 Isolate the Problem
96
Ideally, create a reduced test case. We prefer bug reports with small, portable test cases.
97
 
98
### <a name="4.1.4"></a> 4.1.4 Information Needed for the Report
99
We require the following information:
100
 
101
* :warning: **Observed Results:** A brief description of the problem.
102
* :mag_right: **What steps will reproduce the issue?:** If suitable, including the steps required to reproduce the bug.
103
* :boom: **Expected Results:** What did you expect to happen?
104
 
105
### <a name="4.1.5"></a> 4.1.5 Submit an Issue. :rocket:
1441 ariadna 106
Having all data at hand, file the new issue by filling out our [Issue form](https://github.com/moodlehq/CFPropertyList/issues/new).
1 efrain 107
 
108
**&mdash; That's it! :tada:**
109
 
110
## <a name="4.2"></a> 4.2 How to Create a Pull Request (PR)
111
 
112
Before submitting your Pull Request check for an open or closed PR that relates to your submission. We don't want to duplicate efforts.
113
 
114
### <a name="4.2.1"></a> 4.2.1 Create a Branch and Naming it
115
 
116
The project is organized according to the branch model [Git Flow.](http://nvie.com/posts/a-successful-git-branching-model/) Create a new branch before committing any changes. A _branch is a parallel version of a repository._ It is contained within the repository but does not affect the **`primary or master`** branch.
117
 
118
:heavy_exclamation_mark: **Branch Name Format: `feature/my-killer-feature`**.
119
 
120
:no_entry_sign: **Important:** Do not commit to our default **`develop`** branch. Name it anything _except master, develop, release-*, or hotfix-*_. We'll use **`created-branch`** an example.
121
 
122
### <a name="4.2.2"></a> 4.2.2 Make Changes
123
 
124
Make your changes in your **newly created** branch.
125
 
126
```console
127
    git checkout -b feature/created-branch develop
128
```
129
 
130
### <a name="4.2.3"></a> 4.2.3 Commit Your Changes
131
A commit, or "revision", is an individual change to a file (or set of files). It's like when you save a file, except with Git, every time you save it creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep a record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made.
132
 
133
### <a name="4.2.3.1"></a> 4.2.3.1 Rules to Follow
134
For commits, we follow the [Conventional Commit](http://conventionalcommits.org/). This leads to **more readable messages** that are easy to follow when looking through the project history. But also, we use the git commit messages to **automatically generate changelogs** from these messages.
135
 
136
### <a name="4.2.3.2"></a> 4.2.3.2 Commit Format
137
Each commit message consists of a **header**, a **body**, and a **footer**. The header has a special
138
format that includes a **type**, a **scope**, and a **description**:
139
 
140
**:warning: Important:** Please avoid generic terms.
141
 
142
The commit message should be structured as follows:
143
 
144
```console
145
type(optional scope): description
146
<blank line>
147
optional body
148
<blank line>
149
optional footer
150
```
151
 
152
### <a name="4.2.3.2.1"></a> 4.2.3.2.1 Header: Writing a `type`
153
Commits must be prefixed with a type, which consists of a verb, **feat, fix, build,** followed by a colon and space.
154
 
155
**Your options:**
156
 
157
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm).
158
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs).
159
* **docs**: Documentation only changes.
160
* **feat**: A new feature.
161
* **fix**: A bug fix.
162
* **perf**: A code change that improves performance.
163
* **refactor**: A code change that neither fixes a bug or adds a feature.
164
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
165
* **test**: Adding missing tests or correcting existing tests.
166
 
167
---
168
>**Example for `type`:**
169
>:point_right:feat:point_left:(parser): add ability to parse arrays
170
---
171
 
172
### <a name="4.2.3.2.2"></a> 4.2.3.2.2 Header: Writing the `(optional scope)`
173
Refers to the extent, subject matter or contextual information about your changes. A scope is a phrase describing the file modified or a section of the codebase, it’s always enclosed in parenthesis.
174
 
175
---
176
> **Example for a `(optional scope)`:**
177
> feat:point_right:(parser):point_left:: add ability to parse arrays
178
---
179
 
180
### <a name="4.2.3.2.3"></a> 4.2.3.2.3 Header: Writing a `description`
181
A description must immediately follow the **`type(optional scope):`** The description is a short description of the commit.
182
 
183
**Important**
184
* About commit character length, keep it concise and don't write more than **50 characters**.
185
* Use the imperative present tense: change, make, add, update, fix, etc; Do not use changed, changes, added, fixes, fixed, etc.
186
* Don't capitalize the first letter.
187
* Do not use a dot (.) at the end.
188
 
189
---
190
>**Example for `<description>`**:
191
>feat(parser)::point_right:add ability to parse arrays:point_left:
192
---
193
 
1441 ariadna 194
### <a name="4.2.3.2.4"></a> 4.2.3.2.4 Header Length
1 efrain 195
The **header** cannot be longer than 100 characters. This allows the message to be easier to read on GitHub as well as in various git tools.
196
 
197
### <a name="4.2.3.2.5"></a> 4.2.3.2.5 Writing the `optional body`
198
The body should include the motivation for the change and contrast this with previous behavior.
199
 
200
---
201
>**Example for `optional body`**:
202
```console
203
fix orthography
204
remove out of date paragraph
205
fix broken links
206
```
207
---
208
 
209
### <a name="4.2.3.2.6"></a> 4.2.3.2.6 Writing the `optional footer`
210
The `<optional footer>` should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-using-keywords/) if any.
211
 
212
For example, to close an issue numbered **`123`**, you could use the phrases **`Closes #123`** in your pull request description or commit message. Once the branch is merged into the default branch, the issue will close.
213
 
214
---
215
>**Example for `optional footer`**:
216
>:point_right:Closes #123:point_left:
217
---
218
 
219
### <a name="4.2.3.3"></a> 4.2.3.3 Commit Examples
220
:shit:
221
**Bad**
222
 
223
```console
224
docs(readme): fix orthography, remove out of date paragraph and fix broken links
225
```
226
 
227
:+1:
228
**Good**
229
 
230
```console
231
docs(readme): document design improvement change content
232
 
233
fix orthography
234
remove out of date paragraph
235
fix broken links
236
```
237
 
238
### <a name="4.2.4"></a> 4.2.4 Push your Changes
239
Pushing refers to **sending your committed changes to a remote repository**, such as a repository hosted on GitHub. For instance, if you change something locally, you'd want to then push those changes so that others may access them.
240
 
241
After working on your changes you need to Push it (upload) your **newly created branch** to GitHub
242
 
243
```console
244
    git push origin feature/created-branch
245
```
246
 
247
### <a name="4.2.5"></a> 4.2.5 Create a Pull Request
248
 
249
Pull requests or PR are **proposed changes** to a repository submitted by a user and accepted or rejected by a repository's collaborators.
250
 
1441 ariadna 251
After all the work being pushed to the newly created branch, In GitHub, send a pull request to our [repository.](https://github.com/moodlehq/CFPropertyList/pulls)
1 efrain 252
 
253
### <a name="4.2.5.1"></a> 4.2.5.1 How to Write a Title for a Pull Request
254
Pull Request should be named in reference to the main fix or feature you provide; minor information can be added to the description. Please be specific and don't use generic terms.
255
 
256
**:warning: Important:** Please avoid generic terms.
257
 
258
:straight_ruler:
259
**Title Length:** Keep it concise and don't write more than **50 characters** in the title.
260
 
261
:construction:
262
**For Work in Progress (WIP):** If you don’t want your PR to be merged accidentally, add the word "wip" or "WIP" to its title and the [WIP bot](https://github.com/apps/wip) will set its status to error.
263
 
264
---
265
>**Example for `Titles for work in progress (WIP):`**
266
>:point_right:WIP Added a Table of Content for the Contributing Guideline Document.:point_left:
267
---
268
 
269
:white_check_mark:
270
**Finalized Work:** If you are done with your work and want it to be merged, just write a descriptive title with no more than 50 characters.
271
 
272
---
273
>**Example for `Titles for Finalized Work:`**
274
>:point_right:Added a Table of Content for the Contributing Guideline Document.:point_left:
275
---
276
 
277
### <a name="4.2.5.2"></a> 4.2.5.2 Before Send a Pull Request
278
 
1441 ariadna 279
**1 - Pull Request Description:** Write a description about the changes, we provide a [template](https://github.com/moodlehq/CFPropertyList/community) for Pull Request descriptions. When you're creating a Pull Request it'll be shown automatically. Just fill it out and you're done.
1 efrain 280
 
1441 ariadna 281
**2 - Choose the right label**: Look at the [list of available labels.](https://github.com/moodlehq/CFPropertyList/issues/labels)
1 efrain 282
 
283
**3 - Smash that button!** Press that _Create Pull Request_ button and you're done.
284
 
285
**&mdash; That's it! :tada:**
286
 
287
### <a name="4.2.5.3"></a> 4.2.5.3 How We Check your Submission
288
 
289
#### <a name="4.2.5.3.1"></a> 4.2.5.3.1 Status Check :rotating_light:
290
 
291
Required status checks ensure us that all required tests are passing before collaborators can make changes to a protected branch. We enforce status checks before a branch is merged.
292
 
293
The type of required status check we choose is _Loose_, not all of them are required but some of them determines whether your changes will be reviewed or not. Some of them are here on this list, although, some of them may not be implemented in all repositories:
294
 
295
#### <a name="4.2.5.3.2"></a> 4.2.5.3.2 App/Bots List :traffic_light:
296
 
297
**WIP:** Refers to Work In Progress, this app helps you to prevent your PR to be merged accidentally, add the word "wip" or "WIP" to its title and WIP bot will set its status to error. When you write WIP in the PR title it means that your changes are still in progress or unfinished, so it won't be reviewed until the WIP is removed.
298
 
299
_WIP: Maintainers: Required / Contributors: Required_
300
 
301
**AccessLint:** When a pull request is opened, AccessLint reviews the changes and comments with any new accessibility issues, giving you quick, timely, and targeted feedback, before code goes live.
302
 
303
_AccessLint: Maintainers: Required / Contributors: Required_
304
 
305
**commitlint:** Runs commitlint against all commits of new or edited pull requests and sets an appropriate status check.
306
 
307
_commitlint: Maintainers: Required / Contributors: Required_
308
 
309
**DCO:** This App enforces the Developer Certificate of Origin (DCO) on Pull Requests. It requires all commit messages to contain the Signed-off-by line with an email address that matches the commit author.
310
 
311
_DCO: Maintainers: Required / Contributors: Optional_
312
 
313
**DEP:** A Github App that helps to manage Pull Request dependencies. That App works similar to typical CI services ( e.g Travis) but instead of running a test suite, It will check whether a pull request dependencies are resolved.
314
 
315
_DEP: Maintainers: Required / Contributors: Required_
316
 
317
**ci/circleci build:** CircleCI acts as a platform for both Continuous Integration and Continuous Deployment. If your tests pass, then you can deploy your code to development, staging, production, or other environments.
318
 
319
_ci/circleci build: Maintainers: Required / Contributors: Required_
320
 
321
**continuous-integration/travis-ci/push(and pr):** An automatic construction of the requested changes is carried out and the tests are executed automatically.
322
 
323
_continuous-integration/travis-ci/push(and pr): Maintainers: Required / Contributors: Required_
324
 
325
### <a name="4.2.6"></a> 4.2.6 How to proceed with suggestions
326
 
327
If we suggest changes then:
328
* Make the required updates.
329
* Re-run the test suites to ensure tests are still passing.
330
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
331
 
332
    ```shell
333
    git rebase develop -i
334
    git push -f
335
    ```
336
:warning:
337
**Remove the WIP label:** When a PR is ready for review, remove the prefix WIP in the PR title.
338
 
339
# 5. <a name="5"></a> What to do next? [:top:](#top)
340
 
341
After your pull request is merged, you can safely delete your branch and pull the changes
342
from the main (upstream) repository:
343
 
344
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
345
 
346
    ```shell
347
    git push origin --delete feature/created-branch
348
    ```
349
 
350
* Check out the develop branch:
351
 
352
    ```shell
353
    git checkout develop -f
354
    ```
355
 
356
* Delete the local branch:
357
 
358
    ```shell
359
    git branch -D feature/created-branch
360
    ```
361
 
362
* Update develop with the latest upstream version:
363
 
364
    ```shell
365
    git pull --ff upstream develop
366
    ```
367
 
368
# 6. <a name="6"></a> Coding Rules [:top:](#top)
369
 
370
To ensure consistency throughout the source code, keep these rules in mind as you are working:
371
 
372
* All features or bug fixes must be tested by one or more specs (unit-tests).
373
* All methods must be documented.
374
 
1441 ariadna 375
# Good luck! :tada: