The following items are required across all repositories managed by our Open Source Practice team. By keeping the same experience across all our repositories, it makes it easier for 10uppers and external contributors to work within any repository and operate with the same assumptions as any other 10up repository.
The following labels will our standard set of labels across all open source repositories to help ensure we use clear and consistent labelling terminology. This will allow us to see the status and type of all issues at a glance, to help track and report on contributions across our repositories, and to provide easier ways to find issues to contribute to (e.g., all needs:ux
and type:good-first-issues
). We’re starting a minimal set of labels and will let progressive enhancement further define them for us as well as perform occasional housekeeping.
type:accessibility
- “Issue with accessibility.” (color: #006B75)type:bug
- “Something isn’t working.” (color: #B60205)type:dependency
- “An issue with a separate library that this project relies upon.” (color: #0E8A16)type:enhancement
- “New feature or request.” (color: #1D76DB)type:good-first-issue
- “Good for newcomers.” (color: #5319E7)type:question
- “Further information is requested.” (color: #FF007F)needs:code-review
- “This requires code review.” (color: #FFFFFF)needs:design
- “This requires design to resolve.” (color: #FFFFFF)needs:discussion
- “This requires discussion to determine next steps.” (color: #FFFFFF)needs:documentation
- “This requires documentation.” (color: #FFFFFF)needs:engineering
- “This requires engineering to resolve.” (color: #FFFFFF)needs:feedback
- “This requires reporter feedback to better understand the request.” (color: #FBCA04)needs:qa
- “This requires QA testing.” (color: #FFFFFF)needs:refresh
- “This requires a refreshed PR to resolve.” (color: #FFFFFF)needs:tests
- “This requires tests.” (color: #FFFFFF)needs:ux
- “This requires user experience to resolve.” (color: #FFFFFF)resolution:duplicate
- “This issue has already been logged.” (color: #000000)resolution:not-applicable
- “We do not feel this issue is valid.” (color: #000000)resolution:not-reproducible
- “We are unable to reproduce this issue.” (color: #000000)resolution:resolved
- “This issue has been resolved.” (color: #90EE90)resolution:wontfix
- “We do not intend to resolve this issue.” (color: #000000)We are also adding the following set of milestones across our open source repositories to help give some clarity to the priority of our work (e.g., numbered milestone has priority, Future Release has low priority). When it comes to using numbered milestones (e.g., 1.3.7), we follow the Semantic Versioning as noted in the 10up Engineering Best Practices.
Each repository should have a trunk
and develop
branch with develop
being the default branch. Branching and Deploying should follow the processes outlined in the Engineering Best Practices for plugins. Similarly, we should protect the trunk
branch as outlined in the Engineering Best Practices. Merges should be handled as non-fast-forwards merges as outlined in the Engineering Best Practices and not squash merges so that the trunk
branch maintains full commit and code author history, this is done for transparency and to honor all contributions to our open source work.
This means that we’ll want the following GitHub settings:
develop
trunk
…AND… develop
:Maintain documentation in the same repository as much as possible. This keeps everything portable and usable even when offline. There are two main varieties of documentation typically associated with open source software: usage instructions and maintenance guidelines. Most of this section focuses on maintenance guidelines to support the process you’ve outlined, as usage instructions will vary widely between projects.
Depending on the amount of documentation associated with your projects usage instructions, you may find that hosting them as a separate view, such as GitHub Pages or a GitHub wiki, is preferable to markdown files in a /docs/
subfolder.
If you go the GitHub Pages route, which is our default preference, you should:
/docs/
, and configure GitHub Pages to build from that folder.release
, stable
, or trunk
branch, instead of a develop
or gh-pages
branch.In this way, merging a feature or development branch that contains new/updated code will simultaneously update the documentation to match the new code.
Our Distributor project recently added a GitHub Action to automatically build hook documentation to GitHub Pages based on JSDoc-formatted docblocks within the code (see resulting hook doc site for Distributor). Where feasible, we should look to replicate that process to generate WordPress plugin or theme hook documentation across other projects to improve our level of technical documentation.
The intended support level for each repository should be determined (i.e., Beta, Active, Stable, Archived) and then noted within the GitHub repository and, where applicable, within the WordPress.org repository to clearly state our intentions. The following are recommended GitHub badges and section copy for the README.md file as well as pinned posts within the WordPress.org support forums.
For repositories determined to be under Beta
support, the following GitHub badge should be added at the top of the README.md file:
[![Support Level](https://img.shields.io/badge/support-beta-blueviolet.svg)](#support-level)
…and the following section should be added within the README.md file:
## Support Level
**Beta:** This project is quite new and we're not sure what our ongoing support level for this will be. Bug reports, feature requests, questions, and pull requests are welcome. If you like this project please let us know, but be cautious using this in a Production environment!
For repositories determined to be under Active
support, the following GitHub badge should be added at the top of the README.md file:
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level)
…and the following section should be added within the README.md file:
## Support Level
**Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
For repositories determined to be under Stable
support, the following GitHub badge should be added at the top of the README.md file:
[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level)
…and the following section should be added within the README.md file:
## Support Level
**Stable:** 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.
For repositories determined to be under Archived
support, the following GitHub badge should be added at the top of the README.md file:
[![Support Level](https://img.shields.io/badge/support-archived-red.svg)](#support-level)
…and the following section should be added within the README.md file:
## Support Level
**Archived:** This project is no longer maintained by 10up. We are no longer responding to Issues or Pull Requests unless they relate to security concerns. We encourage interested developers to fork this project and make it their own!
For projects that extend to WordPress.org, the following pinned post should be added to its Support Fourm:
https://github.com/10up/<repository-name-here>
Hi there and thanks for using <plugin-name>!
Note that we loosely monitor the WordPress.org support forums, so for more expedient support please post via our GitHub repository. If you have a question, need support, have found a bug, or have an idea for how to enhance <plugin-name> to better meet your needs, then please use our official plugin support on GitHub: https://github.com/10up/<repository-name-here>/issues. If you’re looking for documentation, then please read those here: https://<docs-URL>.
If you’re looking for help on a tight timeline or need major enhancements to <plugin-name>, then please get in touch with us via our contact form: https://10up.com/contact/.
Thanks!
Ensure that an appropriately sized OpenGraph image is created and uploaded for the repository to ensure social shares best highlight our tools/plugins visually in social streams.
All repositories will leverage GitHub’s built-in security fixes feature (currently in beta) to help automate dependency management so that we are alerted as dependencies update, receive a pull request with dependency updates, and see whether dependency updates pass our automated testing or otherwise requiref further code changes before updating.
All WordPress plugin-related projects should adhere to WordPress Coding Standards (WPCS), like WordPress core, and WordPress VIP Coding Standards (VIPCS). Using our WPCS GitHub Action across all repos and making sure all Pull Requests are required for this check to pass before merging will ensure that all code output matches community agreed upon expectations. Non-WordPress plugin projects should attempt to use a community standard for coding standards where they exist and ideally as part of a GitHub Action to act as a check on all Pull Requests.
In addition to PHP, we should keep JS/TS code following standards. For Open Source plugins, it’s recommended to use eslint
and @wordpress/eslint-plugin:
#.eslintrc
{
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ]
}
Using GitHub Actions is recommended to ensure the changes follow the project’s coding standards. To fit with various setup and requirements, we generate the linting JSON report and use ataylorme/eslint-annotate-action
to highlight all errors and warnings with annotations.
Block for Apple Maps is a great example of using GitHub Actions to check both PHP and JS/TS code.
Coming soon: GitHub Actions and Travis configurations
Changes to our projects should not cause issue with the two most recent major versions of WordPress and the lowest supported version of PHP and above. Our CI pipelines should be testing for and alerting for any changes that do run afoul of this approach.