| 1 | = How to link commits and pull requests with !GitHub issue actions = |
| 2 | |
| 3 | Issues being addressed by a commit or pull request should be referred to in that commit or pull request. Most often you will be closing the issue with the pull request. To do so use one of the magic words below in the commit message or the pull request. |
| 4 | |
| 5 | To refer to issues in commit messages simply type the issue ref such as #10. In order to have the issue be closed whenever the change is merged into master, the syntax is of the form [command] [issueno]. A colon between the command and the issue reference is allowed as is capitalization of the command. The allowed commands are given below: |
| 6 | |
| 7 | {{{ |
| 8 | close |
| 9 | closes |
| 10 | closed |
| 11 | fix |
| 12 | fixes |
| 13 | fixed |
| 14 | resolve |
| 15 | resolves |
| 16 | resolved |
| 17 | }}} |
| 18 | |
| 19 | |
| 20 | **NOTE**: unlike with track each issue to be closed **must** be **individually** prefaced by the command.for example: |
| 21 | {{{ |
| 22 | closes #10 and will also Close #11 |
| 23 | }}} |
| 24 | |
| 25 | The full documentation is available on github: https://help.github.com/en/articles/closing-issues-using-keywords |
| 26 | |