diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..3ea239f8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,37 @@ +## Developer + +### Secrets + +- [ ] All new secrets have been added to Pantheon tiers +- [ ] Relevant secrets have been updated in Github Actions +- [ ] All new secrets documented in README + +### Documentation + +- [ ] Project documentation has been updated +- [ ] No documentation changes are needed + +### Accessibility + +- [ ] ANDI or Wave has been run in accordance to + [our guide](https://mitlibraries.github.io/guides/basics/a11y.html) and + all issues introduced by these changes have been resolved or opened as new + issues (link to those issues in the Pull Request details above) + +### Stakeholder approval + +- [ ] Stakeholder approval has been confirmed +- [ ] Stakeholder approval is not needed + +### Dependencies + +YES | NO dependencies are updated + + +## Code Reviewer + +- [ ] The commit message is clear and follows our guidelines + (not just this pull request message) +- [ ] The changes have been verified +- [ ] The documentation has been updated or is unnecessary +- [ ] New dependencies are appropriate or there were no changes diff --git a/.gitignore b/.gitignore index c3266b69..c09e59e5 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ web/app/mu-plugins/*/ # !web/app/plugins/my-plugin web/app/plugins/* !web/app/plugins/.gitkeep +!web/app/plugins/mitlib-plugin-canary # Themes # We don't ignore all themes by default as these are most commonly where a diff --git a/.lando.yml b/.lando.yml new file mode 100644 index 00000000..b2adac36 --- /dev/null +++ b/.lando.yml @@ -0,0 +1,13 @@ +name: mitlib-wp-network +recipe: pantheon +config: + framework: wordpress_network + site: mitlib-wp-network + id: a43fbf9e-5069-4993-8c78-3561fb284d97 +tooling: + push: disabled + pull: + description: Pull should not ask about code + options: + code: + default: none diff --git a/README.md b/README.md index ba43129f..3f7f1037 100644 --- a/README.md +++ b/README.md @@ -1,138 +1,165 @@ -# Composer-enabled WordPress template +# MIT Libraries WordPress Network + +## Pantheon template [![Early Access](https://img.shields.io/badge/Pantheon-Early%20Access-yellow?logo=pantheon&color=FFDC28)](https://pantheon.io/docs/oss-support-levels#early-access) -This is Pantheon's recommended starting point for forking new [WordPress](https://wordpress.org) upstreams that work with the Platform's Integrated Composer build process. +This application was created using Pantheon's [Composer-enabled WordPress template](https://github.com/pantheon-systems/wordpress-composer-managed). After creation, the application is owned and developed by the staff of the MIT Libraries. -Unlike with other Pantheon upstreams, the WordPress core install, which you are unlikely to adjust while building sites, is not in the main branch of the repository. Instead, it is referenced as dependencies within [Roots/Bedrock](https://roots.io/bedrock/) that are installed by [Composer](https://getcomposer.org). +## Developing this application -## Early Access software +### Prerequisites -A product in Early Access denotes a new project or feature set that is in development and available for a limited audience. Some features are stable, but the product is only partially complete and development is still in progress. For more information on support for Early Access projects, refer to our [documentation](https://pantheon.io/docs/guides/support/early-access/). +To contribute to this application, please make sure your local environment includes the following: -Want to participate in the Early Access program? [Fill out this request form.](https://docs.google.com/forms/d/e/1FAIpQLSe5WvxnzA7_U7B4clhhIYsPxI7DXkmQC-Y8J6pXmrbHYPzviw/viewform?usp=sf_link) +* [Terminus](https://pantheon.io/docs/terminus) for managing Pantheon infrastructure from the command line. +* [Composer](https://getcomposer.org) for managing third-party plugins and themes within WordPress, and tooling outside of WordPress. +* [Lando](https://lando.dev/) for running a local copy of this application. -## Powered by Bedrock +### Branch names -

- - Bedrock - -

+Pantheon imposes [restrictions on branch names](https://pantheon.io/docs/guides/multidev/create-multidev), including a length limit and some reserved words. **The easiest convention is to name your branch after its Jira ticket, which sets up the following relationships:** +| Resource | Value | +|-------------- |----------------------------------------------------------------------------- | +| Ticket | [ENGX-201](https://mitlibraries.atlassian.net/browse/ENGX-201) | +| Git branch | [engx-201](https://github.com/MITLibraries/mitlib-wp-network/tree/engx-201) | +| Multidev URL | https://**engx-201**-mitlib-wp-network.pantheonsite.io/ | -[Bedrock](https://roots.io/bedrock/) is a modern WordPress stack that helps you get started with the best development tools and project structure. +### Git remotes -Much of the philosophy behind Bedrock is inspired by the [Twelve-Factor App](http://12factor.net/) methodology including the [WordPress specific version](https://roots.io/twelve-factor-wordpress/). +Contributing to this project involves working with two separate git servers: -## Features +* We use this Github repository for pull requests, to facilitate [code review](https://mitlibraries.github.io/guides/collaboration/code_review.html). -- Better folder structure -- Dependency management with [Composer](https://getcomposer.org) -- Easy WordPress configuration with environment specific files -- Environment variables with [Dotenv](https://github.com/vlucas/phpdotenv) -- Autoloader for mu-plugins (use regular plugins as mu-plugins) -- Enhanced security (separated web root and secure passwords with [wp-password-bcrypt](https://github.com/roots/wp-password-bcrypt)) +* We push code to Pantheon's git server in order to set up review applications (known as [Multidev](https://pantheon.io/docs/guides/multidev) environments in Pantheon's vocabulary), and push code to the dev->test->live pipeline. Feature branches get deployed to Multidev environments, while the `master` branch gets deployed to the Dev environment for subsequent promotion to the Test and Live environments. -## How to use this project -There are two main ways to interact with this project template. **Using the Pantheon-maintained WordPress Composer Managed upstream** or **forking this repository to create a custom upstream.** +### Common workflows -### Using the Pantheon WordPress Composer Managed upstream (recommended) +While many of the processes for contributing to this application are similar to other projects (see the [Workflows](https://mitlibraries.github.io/guides/basics/github.html#workflows) section of our developer documentation for more information), there are some app-specific steps that need to be followed. -1. Use Terminus to create a site from the Pantheon upstream: -``` -terminus site:create --org ORG --region REGION --