First, thank you for taking the time to contribute!
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.
Contributing isn't just writing code - it's anything that improves the project. All contributions for ClassifAI are managed right here on GitHub. Here are some ways you can help:
If you're running into an issue with the plugin, please take a look through existing issues and open a new one if needed. If you're able, include steps to reproduce, environment information, and screenshots/screencasts as relevant.
New features and enhancements are also managed via issues.
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.
For more on how 10up writes and manages code, check out our 10up Engineering Best Practices.
Helping to test an open source project and provide feedback on success or failure of those tests is also a helpful contribution. You can find details on the Critical Flows and Test Cases in this project's GitHub Wiki as well as details on our overall approach to Critical Flows and Test Cases in our Open Source Best Practices. Submitting the results of testing via our Critical Flows as a comment on a Pull Request of a specific feature or as an Issue when testing the entire project is the best approach for providing testing results.
The develop branch is the development branch which means it contains the next version to be released. stable contains the current latest release and trunk contains the corresponding stable development version. Always work on the develop branch and open up PRs against develop.
- Branch: Starting from
develop, cut a release branch namedrelease/X.Y.Zfor your changes. - Version bump: Bump the version number in
classifai.php,config.php,package-lock.json,package.json, andreadme.txtif it does not already reflect the version being released. For major version releases, also update inwp-hooks-docs/docs/01.get-started/01.installation.md. - Changelog: Add/update the changelog in
CHANGELOG.md. - Props: update
CREDITS.mdfile with any new contributors, confirm maintainers are accurate. - New files: Check to be sure any new files/paths that are unnecessary in the production version are included in
.gitattributes. - Readme updates: Make any other readme changes as necessary in
README.mdandreadme.txt. - Features + Providers: If there is a new feature, new provider, or new intersection of the two then ensure that's added to our documentation and the Choose Your AI Platforms page.
- Merge: Make a non-fast-forward merge from your release branch to
develop(or merge the pull request), then do the same fordevelopintotrunk(git checkout trunk && git merge --no-ff develop).trunkcontains the stable development version. - Push: Push your trunk branch to GitHub (e.g.
git push origin trunk). - Wait for build: Head to the Actions tab in the repo and wait for it to finish if it hasn't already. If it doesn't succeed, figure out why and start over.
- Check the build: Check out the
stablebranch and test for functionality locally. - Either perform a regression testing utilizing the available Critical Flows and Test Cases or if end-to-end tests cover a significant portion of those Critical Flows then run e2e tests. Only proceed if everything tests successfully.
- Release: Create a new release, naming the tag and the release with the new version number, and targeting the
stablebranch. Paste the changelog fromCHANGELOG.mdinto the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases and in the WordPress admin as an update as well. - Close milestone: Edit the milestone with release date (in the
Due date (optional)field) and link to GitHub release (in theDescription field), then close the milestone. - Punt incomplete items: If any open issues or PRs which were milestoned for
X.Y.Zdo not make it into the release, update their milestone toX.Y.Z+1,X.Y+1.0,X+1.0.0orFuture Release. - Version bump (again): In the
developbranch (cd ../ && git checkout develop) bump the version number inclassifai.phptoX.Y.(Z+1)-dev. It's okay if the next release might be a different version number; that change can be handled right before release in the first step, as might also be the case with@sinceannotations.