|
| 1 | +--- |
| 2 | +title: Contributing to the Selenium Documentation |
| 3 | +disableToc: true |
| 4 | +--- |
| 5 | + |
| 6 | +{{% notice info %}} |
| 7 | +<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。 |
| 8 | +日本語は話せますか?プルリクエストをして翻訳を手伝ってください! |
| 9 | +{{% /notice %}} |
| 10 | + |
| 11 | +Selenium is a big software project and documentation is key to |
| 12 | +understanding how things work and learning effective ways to exploit |
| 13 | +its potential. |
| 14 | + |
| 15 | +Part of the documentation of Selenium is still served from our |
| 16 | +[**www.seleniumhq.org** repository](https://github.com/SeleniumHQ/www.seleniumhq.org). |
| 17 | +We are however phasing out this documentation which focuses too much |
| 18 | +on Selenium RC and other antiquated pieces, in favour of this rewrite. |
| 19 | + |
| 20 | +The new documentation is a project started to rewrite Selenium's |
| 21 | +documentation from scratch. This is an ongoing effort (not targetted |
| 22 | +at any specific release) to provide an updated handbook on how to use |
| 23 | +Selenium effectively. We hope to bring over the pieces of the old |
| 24 | +documentation that makes sense. |
| 25 | + |
| 26 | +Contributions toward the new docs follow the process described in |
| 27 | +the below section about contributions. You should spend some time |
| 28 | +familiarising yourself with the documentation by reading |
| 29 | +[more about it]({{< ref "/introduction/about_this_documentation.ja.md" >}}). |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +The Selenium project welcomes contributions from everyone. There are a |
| 34 | +number of ways you can help: |
| 35 | + |
| 36 | +## Report an issue |
| 37 | + |
| 38 | +When reporting a new issues or commenting on existing issues please |
| 39 | +make sure discussions are related to concrete technical issues with the |
| 40 | +Selenium software and/or its documentation. |
| 41 | + |
| 42 | +All of the Selenium components change quite fast over time, so this |
| 43 | +might cause the documentation to be out of date. If you find this to |
| 44 | +be the case, as mentioned, don't doubt to create an issue for that. |
| 45 | +It also might be possible that you know how to bring up to date the |
| 46 | +documentation, so please send us a pull request with the related |
| 47 | +changes. |
| 48 | + |
| 49 | +If you are not sure about what you have found is an issue or not, |
| 50 | +please ask first about it to the |
| 51 | +[selenium-users@ mailing list](https://groups.google.com/forum/#!forum/selenium-users), |
| 52 | +or join us in the `#selenium` channel |
| 53 | +on [irc.freenode.org](https://webchat.freenode.net/) or [Slack](https://seleniumhq.herokuapp.com/). |
| 54 | + |
| 55 | +## Contributions |
| 56 | + |
| 57 | +The Selenium project welcomes new contributors. Individuals making |
| 58 | +significant and valuable contributions over time are made _Committers_ |
| 59 | +and given commit-access to the project. |
| 60 | + |
| 61 | +This document will guide you through the contribution process. |
| 62 | + |
| 63 | +### Step 1: Fork |
| 64 | + |
| 65 | +Fork the project [on Github](https://github.com/seleniumhq/docs) |
| 66 | +and check out your copy locally. |
| 67 | + |
| 68 | +```shell |
| 69 | +% git clone git@github.com:username/docs.git |
| 70 | +% cd docs |
| 71 | +% git remote add upstream git://github.com/seleniumhq/docs.git |
| 72 | +``` |
| 73 | + |
| 74 | +https://gohugo.io/getting-started/installing/ |
| 75 | + |
| 76 | +#### Dependencies: Hugo |
| 77 | + |
| 78 | +The docs use [Hugo](https://gohugo.io/) to build and render the site. |
| 79 | +To verify everything locally before even commiting any changes, please |
| 80 | +[install Hugo](https://gohugo.io/getting-started/installing/) and |
| 81 | +[run the local server](https://gohugo.io/getting-started/usage/#livereload) |
| 82 | +to render the site locally. |
| 83 | + |
| 84 | +### Step 2: Branch |
| 85 | + |
| 86 | +Create a feature branch and start hacking: |
| 87 | + |
| 88 | +```shell |
| 89 | +% git checkout -b my-feature-branch |
| 90 | +``` |
| 91 | + |
| 92 | +We practice HEAD-based development, which means all changes are applied |
| 93 | +directly on top of master. |
| 94 | + |
| 95 | +### Step 3: Commit |
| 96 | + |
| 97 | +First make sure git knows your name and email address: |
| 98 | + |
| 99 | +```shell |
| 100 | +% git config --global user.name 'Santa Claus' |
| 101 | +% git config --global user.email 'santa@example.com' |
| 102 | +``` |
| 103 | + |
| 104 | +**Writing good commit messages is important.** A commit message |
| 105 | +should describe what changed, why, and reference issues fixed (if |
| 106 | +any). Follow these guidelines when writing one: |
| 107 | + |
| 108 | +1. The first line should be around 50 characters or less and contain a |
| 109 | + short description of the change. |
| 110 | +2. Keep the second line blank. |
| 111 | +3. Wrap all other lines at 72 columns. |
| 112 | +4. Include `Fixes #N`, where _N_ is the issue number the commit |
| 113 | + fixes, if any. |
| 114 | + |
| 115 | +A good commit message can look like this: |
| 116 | + |
| 117 | +```text |
| 118 | +explain commit normatively in one line |
| 119 | +
|
| 120 | +Body of commit message is a few lines of text, explaining things |
| 121 | +in more detail, possibly giving some background about the issue |
| 122 | +being fixed, etc. |
| 123 | +
|
| 124 | +The body of the commit message can be several paragraphs, and |
| 125 | +please do proper word-wrap and keep columns shorter than about |
| 126 | +72 characters or so. That way `git log` will show things |
| 127 | +nicely even when it is indented. |
| 128 | +
|
| 129 | +Fixes #141 |
| 130 | +``` |
| 131 | + |
| 132 | +The first line must be meaningful as it's what people see when they |
| 133 | +run `git shortlog` or `git log --oneline`. |
| 134 | + |
| 135 | +### Step 4: Rebase |
| 136 | + |
| 137 | +Use `git rebase` (not `git merge`) to sync your work from time to time. |
| 138 | + |
| 139 | +```shell |
| 140 | +% git fetch upstream |
| 141 | +% git rebase upstream/master |
| 142 | +``` |
| 143 | + |
| 144 | +### Step 5: Test |
| 145 | + |
| 146 | +Always remember to [run the local server](https://gohugo.io/getting-started/usage/#livereload), |
| 147 | +with this you can be safe that your changes have not broken anything. |
| 148 | + |
| 149 | +### Step 6: Translations |
| 150 | + |
| 151 | +If you are updating the docs, adding new ones, or deleting deprecated ones, please remember |
| 152 | +to update the translations of it. Of course, it is possible that you do not speak all the |
| 153 | +translated languages in the docs. For that, please create an |
| 154 | +[issue](https://github.com/SeleniumHQ/docs/issues) where you clearly describe that something |
| 155 | +in the docs has changed and its translation needs to be updated. With that, someone who speaks |
| 156 | +that needed language can chime in and help us to keep it up to date. |
| 157 | + |
| 158 | +### Step 7: Sign the CLA |
| 159 | + |
| 160 | +Before we can accept, we first ask people to sign a |
| 161 | +[Contributor License Agreement](https://spreadsheets.google.com/spreadsheet/viewform?hl=en_US&formkey=dFFjXzBzM1VwekFlOWFWMjFFRjJMRFE6MQ#gid=0) |
| 162 | +(or CLA). We ask this so that we know that contributors have the right |
| 163 | +to donate the code. |
| 164 | + |
| 165 | +When you open your pull request we ask that you indicate that you've |
| 166 | +signed the CLA. This will reduce the time it takes for us to integrate |
| 167 | +it. |
| 168 | + |
| 169 | +### Step 8: Push |
| 170 | + |
| 171 | +```shell |
| 172 | +% git push origin my-feature-branch |
| 173 | +``` |
| 174 | + |
| 175 | +Go to https://github.com/yourusername/docs.git and press the _Pull |
| 176 | +Request_ and fill out the form. **Please indicate that you've signed |
| 177 | +the CLA** (see Step 6). |
| 178 | + |
| 179 | +Pull requests are usually reviewed within a few days. If there are |
| 180 | +comments to address, apply your changes in new commits (preferably |
| 181 | +[fixups](http://git-scm.com/docs/git-commit)) and push to the same |
| 182 | +branch. |
| 183 | + |
| 184 | +### Step 9: Integration |
| 185 | + |
| 186 | +When code review is complete, a committer will take your PR and |
| 187 | +integrate it on the docs's gh-pages branch. Because we like to keep a |
| 188 | +linear history on the master branch, we will normally squash and rebase |
| 189 | +your branch history. |
| 190 | + |
| 191 | +## Communication |
| 192 | + |
| 193 | +Selenium contributors frequent the `#selenium` channel on |
| 194 | +[`irc.freenode.org`](https://webchat.freenode.net/) or on |
| 195 | +or [Slack](https://seleniumhq.herokuapp.com/). You can also join |
| 196 | +the [`selenium-developers@` mailing list](https://groups.google.com/forum/#!forum/selenium-developers). |
0 commit comments