Updating project readme, adding Contributing instructions

This commit is contained in:
James Hunt 2023-02-20 23:45:48 +07:00
parent 8a93cd09c9
commit a020083c13
2 changed files with 47 additions and 5 deletions

40
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,40 @@
# Contributing to CNCF.io
This document describes guidelines for contributing to the CNCF.io git repository. Everyone is welcome to contribute to this project. Please read and follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md) to ensure that everyone has a positive experience.
## Open source
All code in and contributions to this repository are open source and covered by the [MIT license](https://github.com/cncf/cncf.io/blob/main/LICENSE).
## Issues and discussions
We use [GitHub Issues](https://github.com/cncf/cncf.io/issues) to track all issues, bug reports, discussions and work for the CNCF.io website. Please feel encouraged to participate by [creating an issue](https://github.com/cncf/cncf.io/issues/new), commenting on an existing issue, or working to solve an issue.
We use [GitHub Projects](https://github.com/cncf/cncf.io/projects/1) to manage the prioritization and stages of work of each issue. We also tag issues when they are blocked in any way.
## Working on an issue
Before starting work on an issue, please check it is not already assigned to someone and not already in progress. If the issue is open, and you can complete it, please comment on the issue that you plan to start work on it to let the team know.
## WordPress database
Due to how WordPress works, much of the CNCF.io website is stored inside a database. Because the database contains usernames, passwords and other information, the data is not available to users outside the CNCF organization. This may limit some of the issues that can be worked on by the community. However the website repo should work with an empty WordPress database and this is the advised approach to take for external contributors. If you run into problems, please open a support issue describing them.
## Contribution flow
Follow these instructions when working on an issue:
1. Fork the repo to your own GitHub account.
2. Create a branch from where you want to base your work (usually ```main```). Example ```git checkout -b my-new-feature```).
3. Read the ```readme.md``` to understand how to set up a local development environment.
4. Make your changes and arrange them in readable commits.
5. Run your changes through the PHPCS WordPress coding standards to ensure your code is compliant.
6. Commit your changes while referencing the issue number in the commit message. For example, if you are working on issue #888, your commit message could be ```#888, Fixed typo```. Sign your commit.
7. Push to your branch.
8. Make sure your branch is up to date with upstream base branch (eg. ```main```).
9. Create a new Pull Request (PR) describing the work that has been done.
10. Await review of your PR.
## Thank you!
Thank you for your contributions. We appreciate your help and look forward to collaborating with you!

View File

@ -1,10 +1,12 @@
[![CircleCI](https://circleci.com/gh/cncf/cncf.io.svg?style=svg)](https://circleci.com/gh/cncf/cncf.io)
# Contributing to CNCF.io
Everyone is welcome to contribute to this project. We've created a document that describes guidelines for [contributing to the CNCF.io git repository](/CONTRIBUTING.md).
# CNCF.io Developer Instructions
CNCF.io infrastructure builds in a similar way to [LFEvents](https://github.com/LF-Engineering/lfevents).
-----
These instructions are based on you having access to the CNCF.io Pantheon account (and the CNCF.io WordPress database).
## Install Local Instance
@ -109,7 +111,7 @@ services:
9. In the admin you will need to edit the [Search & Filter](https://cncfci.lndo.site/wp/wp-admin/edit.php?post_type=search-filter-widget) settings. The full url to the result pages are hardcoded in the "Display Results" of each filter. These will need to be set to the correpsonding local instance url.
10. Get your browser to trust the Lando SSL certificate by following [these instructions](https://docs.lando.dev/config/security.html#trusting-the-ca). This step isn't essential but will stop you having to keep bypassing the privacy warning in your browser. On MacOS Catalina, I also had to manually go into Keychain Access and set the *.lndo.site certificate to “Always Trust”. See [screenshot](/docs/ca-screenshot.png).
10. Get your browser to trust the Lando SSL certificate by following [these instructions](https://docs.lando.dev/config/security.html#trusting-the-ca). This step isn't essential but will stop you having to keep bypassing the privacy warning in your browser. On MacOS, you may also need to manually go into Keychain Access and set the ```*.lndo.site``` certificate to “Always Trust”. See [screenshot](/ca-screenshot.png).
### Notes
@ -154,7 +156,7 @@ lando phpcs -i
## Upgrading WordPress core, themes and plugins
The dependencies of this project are managed by [Composer](https://getcomposer.org/). All dependencies of the project are set in [composer.json](https://github.com/cncf/cncf.io/blob/master/composer.json) and are pulled in at deploy time according to what is set in [composer.lock](https://github.com/cncf/cncf.io/blob/master/composer.lock).
The dependencies of this project are managed by [Composer](https://getcomposer.org/). All dependencies of the project are set in [composer.json](https://github.com/cncf/cncf.io/blob/main/composer.json) and are pulled in at deploy time according to what is set in [composer.lock](https://github.com/cncf/cncf.io/blob/main/composer.lock).
composer.lock is generated from composer.json only when explicitly calling the `lando composer update` function. Any additional themes or plugins can be added first to composer.json and then `lando composer update` is run to update composer.lock and pull in the new files. Dependencies are pegged to a version according to the composer [versioning rules](https://getcomposer.org/doc/articles/versions.md).