|
| 1 | +# Contributing and Maintaining |
| 2 | + |
| 3 | +First, thank you for taking the time to contribute! |
| 4 | + |
| 5 | +The following is a set of guidelines for contributors as well as information and instructions around our maintenance process. The two are closely tied together in terms of how we all work together and set expectations, so while you may not need to know everything in here to submit an issue or pull request, it's best to keep them in the same document. |
| 6 | + |
| 7 | +## Ways to contribute |
| 8 | + |
| 9 | +Contributing isn't just writing code - it's anything that improves the project. All contributions are managed right here on GitHub. Here are some ways you can help: |
| 10 | + |
| 11 | +### Reporting bugs |
| 12 | + |
| 13 | +If you're running into an issue, please take a look through [existing issues](https://github.com/10up/wp-hooks-documentor/issues) and [open a new one](https://github.com/10up/wp-hooks-documentor/issues/new) if needed. If you're able, include steps to reproduce, environment information, and screenshots/screencasts as relevant. |
| 14 | + |
| 15 | +### Suggesting enhancements |
| 16 | + |
| 17 | +New features and enhancements are also managed via [issues](https://github.com/10up/wp-hooks-documentor/issues). |
| 18 | + |
| 19 | +### Pull requests |
| 20 | + |
| 21 | +Pull requests represent a proposed solution to a specified problem. They should always reference an issue that describes the problem and contains discussion about the problem itself. Discussion on pull requests should be limited to the pull request itself, i.e. code review. |
| 22 | + |
| 23 | +For more on how 10up writes and manages code, check out our [10up Engineering Best Practices](https://10up.github.io/Engineering-Best-Practices/). |
| 24 | + |
| 25 | +## Workflow |
| 26 | + |
| 27 | +The `develop` branch is the development branch which means it contains the next version to be released. `trunk` contains the current latest released version as reflected here on GitHub. Always work on the `develop` branch and open up PRs against `develop`. |
| 28 | + |
| 29 | +## Release instructions |
| 30 | + |
| 31 | +1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes. |
| 32 | +2. Version bump: Bump the version number in `package.json`, `package-lock.json` and any other relevant files if it does not already reflect the version being released. |
| 33 | +3. Changelog: Add/update the changelog in `CHANGELOG.md`. |
| 34 | +4. Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate. |
| 35 | +5. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`. |
| 36 | +6. Readme updates: Make any other readme changes as necessary. |
| 37 | +7. Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk` (`git checkout trunk && git merge --no-ff develop`). `trunk` contains the stable development version. |
| 38 | +8. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`). |
| 39 | +9. Release: Create a [new release](https://github.com/10up/wp-hooks-documentor/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the [milestone](https://github.com/10up/wp-hooks-documentor/milestone/#?closed=1). |
| 40 | +10. Close milestone: Edit the [milestone](https://github.com/10up/wp-hooks-documentor/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone. |
| 41 | +11. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`. |
| 42 | + |
| 43 | +### What to do if things go wrong |
| 44 | + |
| 45 | +If you run into issues during the release process and things have NOT fully deployed to WordPress.org / npm / whatever external-to-GitHub location that we might be publishing to, then the best thing to do will be to delete any Tag (e.g., https://github.com/10up/wp-hooks-documentor/releases/tag/TAGNAME) or Release that's been created, research what's wrong, and once things are resolved work on re-tagging and re-releasing on GitHub and publishing externally where needed. |
| 46 | + |
| 47 | +If you run into issues during the release process and things HAVE deployed to WordPress.org / npm / whatever external-to-GitHub location that we might be publishing to, then the best thing to do will be to research what's wrong and once things are resolved work on a patch release and tag on GitHub and publishing externally where needed. At the top of the changelog / release notes it's best to note that its a hotfix to resolve whatever issues were found after the previous release. |
0 commit comments