|
| 1 | +# Auro Design System Contributing Guidelines |
| 2 | + |
| 3 | +Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved. Also be sure to review the [Issues, pull requests and labels](https://auro.alaskaair.com/contributing/issues-prs-labels) process document. |
| 4 | + |
| 5 | +If you are an Alaska Airlines Employee, Contractor, or Vendor, please see our [Innersourcing Flow Guide on Sharepoint](https://alaskaair.sharepoint.com/sites/ECOMt/Guilds/auro-users-and-contributors). |
| 6 | + |
| 7 | +## Feature Requests |
| 8 | + |
| 9 | +Feature requests stem from a business need. It is important to understand whether your idea fits within the scope and aims of this project or if this serves to address a personal/local scenario. It is up to you to make a strong case about the merits of this feature. Please provide as much detail and context as possible. |
| 10 | + |
| 11 | +## Submitting issues |
| 12 | + |
| 13 | +A bug is defined by: _"A demonstrable problem that is caused by a file in the repository."_ Good bug reports are extremely helpful - thank you! |
| 14 | + |
| 15 | +To submit an issue, please go to [Auro's project status board](https://auro.alaskaair.com/component-status) and click on the ISSUES link to the left of the associated project you wish to submit an issue for, or click on the GITHUB ISSUES icon at the top of every element's page in the Auro doc site. |
| 16 | + |
| 17 | +Guidelines for bug reports: |
| 18 | + |
| 19 | +1. BEFORE submitting an issue, make sure that you are **using the latest version** of the component you are working with and/or see if you can reproduce the error in the Auro doc site. |
| 20 | +1. Check if the issue has already been reported. Go to any Auro repo's issue page and use Github's search features to see if a similar issue has been submitted. |
| 21 | +1. Check if the issue has been fixed — try to reproduce it using the latest main or feature branch in the repository |
| 22 | +1. Isolate the problem — ideally create a reduced test case and a live example |
| 23 | + |
| 24 | +Please allow up to 48 hours to receive a response from the Auro team post issue submission. |
| 25 | + |
| 26 | +A good bug report shouldn't leave others needing to follow 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 browser(s) and OS experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs. |
| 27 | + |
| 28 | +Poor bug reports will be closed as the team is unable to reproduce the issue. |
| 29 | + |
| 30 | +PLEASE be responsive to questions asked via the issue's comments. All attempts to communicate to the author of the issue will be made. If the author is unresponsive, the issue will be labeled as `abandoned` and will be closed upon next review. |
| 31 | + |
| 32 | +Please remember, submitting an issue is not a work request. The issue itself is a report of the situation, not a solutions statement. |
| 33 | + |
| 34 | +Please **DO NOT** start any work on a potential pull request until you have consulted with a member of the Auro team per your issue. This brief consultation, facilitated via the issue and its related comments, will help ensure the success of your pull request submission. |
| 35 | + |
| 36 | +## Submitting pull requests |
| 37 | + |
| 38 | +No one other than repository maintainers and trusted committers have `write` access to any repository. For others a pull request must originate from a [forked repo](https://auro.alaskaair.com/contributing/upstream) in your own Github account. If you are interested in `write` access to Auro, please submit a request to the team's leadership. |
| 39 | + |
| 40 | +All new work that is to be considered for merging with the `main` branch must start from a new feature branch of work. This feature branch should be in response to either a [reported bug](https://auro.alaskaair.com/bugs) or a [requested features](https://auro.alaskaair.com/help-wanted). |
| 41 | + |
| 42 | +Unsolicited pull requests **will take longer** to respond to. We ask for your patience. To help expedite any pull request, we ask that you **submit an issue first**. This will help the team understand the problem you are trying to solve before submitting the solution. |
| 43 | + |
| 44 | +To assist with the pull request review, it is also recommended that you **DO NOT** do any work until you have consulted with maintainer related to the Auro project. This process will be facilitated via the issue and its related comments. Once an issue is submitted, please allow up to 48 hours to receive a response from the Auro team post issue submission. |
| 45 | + |
| 46 | +### Feature branch naming |
| 47 | + |
| 48 | +The name of the feature branch should be descriptive as to the nature of the work, reference the author, and please include any references to the story or bug work item ID. For example, if John Doe created a branch for issue #80 about cleaning up the npm API. |
| 49 | + |
| 50 | +```shell |
| 51 | +jdoe/cleanUpNpmApi/#80 |
| 52 | +``` |
| 53 | + |
| 54 | +## DO NOT git pull on a feature branch |
| 55 | + |
| 56 | +We ask that we keep our repo's history linear. This helps maintain a easy to understand version history and is crucial to our semantic versioning strategy. If you find yourself unable to push to the remote, please **DO NOT** use the `$ git pull` command. If this is discovered during a review, **the pull request will be rejected**. Please see the following instructions on rebasing below. |
| 57 | + |
| 58 | +### Rebase on main |
| 59 | + |
| 60 | +To maintain repository history health, it is best practice to [rebase branches off of an updated main versus merging down](https://www.atlassian.com/git/tutorials/merging-vs-rebasing). |
| 61 | + |
| 62 | +If you have push access to the repo |
| 63 | + |
| 64 | +``` |
| 65 | +$ git checkout main |
| 66 | +$ git pull |
| 67 | +$ git checkout [feature branch] |
| 68 | +$ git rebase main |
| 69 | +$ git push origin [feature branch] --force |
| 70 | +``` |
| 71 | + |
| 72 | +If you are working off a forked branch, please see [Maintaining your fork's upstream relationship](https://auro.alaskaair.com/contributing/upstream) to sync your main branch and then follow the outlined steps. |
| 73 | + |
| 74 | +## Conventional Commits |
| 75 | + |
| 76 | +This project utilizes [Conventional Commits](https://www.conventionalcommits.org/) to auto-generate release versions, based on the [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines). |
| 77 | + |
| 78 | +**NOTE:** Before working in your project, be sure to run `$ npm i` to ensure that all packages are installed. |
| 79 | + |
| 80 | +#### Commit Message Format |
| 81 | + |
| 82 | +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: |
| 83 | + |
| 84 | +```html |
| 85 | +<type>(<scope>): <subject> <!-- header --> |
| 86 | +<BLANK LINE> |
| 87 | +<body> |
| 88 | +<BLANK LINE> |
| 89 | +<footer> |
| 90 | +``` |
| 91 | + |
| 92 | +**Any line of the commit message cannot be longer 100 characters!** This allows the message to be easier to read on GitHub as well as in various git tools. The **header** MUST use an **imperative mood**. The **body**, freeform text is allowed. Please see the **Git commit messages** section below. |
| 93 | + |
| 94 | +The header is mandatory and the scope of the header is optional. Please see this [example commit](https://github.com/AlaskaAirlines/WC-Generator/commit/8e24c16461ca71349c8986da2a2f33b88426e015) from the WC-Generator repo. |
| 95 | + |
| 96 | +Submitting pull requests that do not conform to the Conventional Commits standard, the team will assume that development dependencies were not installed and no tests were validated prior to submission. **This may result in immediate disqualification of the pull request**. |
| 97 | + |
| 98 | +#### Prefixes |
| 99 | + |
| 100 | +**All commit messages** must be prefixed with a specific type so that the semver release configuration can analyze the commit and apply the correct version release. Please see the following types with their respective meanings. |
| 101 | + |
| 102 | +#### MAJOR |
| 103 | + |
| 104 | +For a **MAJOR** release, you **MUST** follow this template. The use `BREAKING CHANGE:` in conjunction with any other commit type is required in order to push a major release. |
| 105 | + |
| 106 | +A `BREAKING CHANGE` body message can be appended to any prefix that is descriptive of the change. |
| 107 | + |
| 108 | +``` |
| 109 | +refactor(pencil): remove graphiteWidth option #80 |
| 110 | +
|
| 111 | +BREAKING CHANGE: The graphiteWidth option has been removed. |
| 112 | +The default graphite width of 10mm is always used for performance reasons. |
| 113 | +``` |
| 114 | + |
| 115 | +#### MINOR |
| 116 | + |
| 117 | +Using the `feat` prefix will result in a `0.1.0` SemVer release update. |
| 118 | + |
| 119 | +``` |
| 120 | +feat(pencil): add 'graphiteWidth' option #80 |
| 121 | +``` |
| 122 | + |
| 123 | +#### PATCH |
| 124 | + |
| 125 | +Using the `fix` or `perf` prefix will result in a `0.0.1` SemVer release update. |
| 126 | + |
| 127 | +``` |
| 128 | +fix(pencil): stop graphite breaking when too much pressure applied #80 |
| 129 | +``` |
| 130 | + |
| 131 | +#### Other commit types |
| 132 | + |
| 133 | +| type | description | |
| 134 | +|---|---| |
| 135 | +| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) | |
| 136 | +| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) | |
| 137 | +| docs | Documentation only changes | |
| 138 | +| feat | A new feature (this correlates with `MINOR` in semantic versioning) | |
| 139 | +| fix | A bug fix (this correlates with `PATCH` in semantic versioning) | |
| 140 | +| perf | A code change that improves performance (this correlates with `PATCH` in semantic versioning) | |
| 141 | +| BREAKING CHANGE | A code change that is not backwards compatible (correlating with `MAJOR` in semantic versioning) | |
| 142 | +| refactor | A code change that neither fixes a bug nor adds a feature | |
| 143 | +| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | |
| 144 | +| test | Adding missing tests or correcting existing tests | |
| 145 | + |
| 146 | +It is considered best practice to group multiple commits into a release. For a versioned update, be sure that your series of commits include either `feat`, `fix` or `perf`. For a `MAJOR` release, any commit can be accompanied by a `BREAKING CHANGE` comment as illustrated above. |
| 147 | + |
| 148 | +## Git commit messages |
| 149 | + |
| 150 | +Once you have completed your feature update, please commit all changes to the branch. All commit messages should use an **imperative mood**. |
| 151 | + |
| 152 | +Imperative mood simply means _“spoken or written as if giving a command or instruction”_. A few examples are: |
| 153 | + |
| 154 | +* Clean your room |
| 155 | +* Close the door |
| 156 | +* Take out the trash |
| 157 | + |
| 158 | +A properly formed Git commit subject line should always be able to complete the following sentence: |
| 159 | + |
| 160 | +_"If applied, this commit will (your subject line here)."_ |
| 161 | + |
| 162 | +For example: |
| 163 | + |
| 164 | +* If applied, this commit will `refactor component X for accessibility` |
| 165 | +* If applied, this commit will `add feature Y to component X` |
| 166 | + |
| 167 | +Example messages when using Conventional Commits: |
| 168 | + |
| 169 | +``` |
| 170 | +$ build(postCss): update the build step to include postCSS #67 |
| 171 | +
|
| 172 | +$ docs(install): address typo in install instructions #14 |
| 173 | +
|
| 174 | +$ perf(api): restructure API to comply with new feature spec #12 |
| 175 | +
|
| 176 | +$ feat(data api): add ability to consume large data as an array versus string #71 |
| 177 | +
|
| 178 | +$ fix(color api): address color output issue #105 |
| 179 | +``` |
| 180 | + |
| 181 | +Please add all details to the commit description in the body of the commit message. There is no character limit and no need to be imperative. Listing out the files that were changed in the commit is always helpful. Consider the following example. |
| 182 | + |
| 183 | +``` |
| 184 | +docs(issues): update issue templates and settings yml #337 |
| 185 | +
|
| 186 | +This issue updates the bug report template to clarify |
| 187 | +some of the content when the form is completed. |
| 188 | +
|
| 189 | +Changes to be committed: |
| 190 | +modified: .github/ISSUE_TEMPLATE/settings.yml |
| 191 | +newfile: .github/ISSUE_TEMPLATE/bug_report.yml |
| 192 | +newfile: .github/ISSUE_TEMPLATE/feature_request.yml |
| 193 | +newfile: .github/ISSUE_TEMPLATE/general-support.yml |
| 194 | +deleted: .github/ISSUE_TEMPLATE/bug_report.md |
| 195 | +deleted: .github/ISSUE_TEMPLATE/feature_request.md |
| 196 | +``` |
| 197 | + |
| 198 | +## Pull request service level agreement |
| 199 | + |
| 200 | +Once a pull request has been created, the assigned reviewer will receive a notification. |
| 201 | + |
| 202 | +Pull request response time depends on the scope of the pull request. |
| 203 | + |
| 204 | +* If the work is solicited and there is an issue assigned to the work, the author of the pull request should expect to receive feedback within 24 hours. |
| 205 | +* If the work is unsolicited, and/or is a new feature or refactor of a current feature, the author may expect to wait up to 72 hours for feedback as this will take additional resources to understand the scope of the update. |
| 206 | + |
| 207 | +The reviewer has the option to leave comments, ask questions and reject the pull request if warranted. |
| 208 | + |
| 209 | +Once a reviewer has approved the work, the pull request can then be merged into the main branch. |
0 commit comments