From b5fe0f167791c540625f488f8b972a7a622992ed Mon Sep 17 00:00:00 2001 From: Damien Retzinger Date: Thu, 28 Jul 2022 10:27:07 -0400 Subject: [PATCH] docs: add contributing and code of conduct Thank you to @ihor-sviziev --- CODE_OF_CONDUCT.md | 46 ++++++++++ CONTRIBUTING.md | 223 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 269 insertions(+) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..465df7e --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project lead at [damien@graycore.io](mailto:damien@graycore.io). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6074158 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,223 @@ +# Contributing to Github Actions for Magento 2 + +We would love for you to contribute to "Github Actions for Magento 2" and help make it even better than it is +today! As a contributor, here are the guidelines we would like you to follow: + + - [Code of Conduct](#coc) + - [Question or Problem?](#question) + - [Issues and Bugs](#issue) + - [Feature Requests](#feature) + - [Submission Guidelines](#submit) + - [Coding Rules](#rules) + - [Commit Message Guidelines](#commit) + +## Code of Conduct +Help us keep "Github Actions for Magento 2" open and inclusive. Please read and follow our [Code of Conduct][coc]. + +## Got a Question or Problem? + +Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [Discussions](https://github.com/graycoreio/github-actions-magento2/discussions). + +To save your and our time, we will systematically close all issues that are requests for general support and redirect people to [Discussions](https://github.com/graycoreio/github-actions-magento2/discussions). + +## Found a Bug? +If you find a bug in the source code, you can help us by +[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can +[submit a Pull Request](#submit-pr) with a fix. + +## Missing a Feature? +You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub +Repository. If you would like to *implement* a new feature, please submit an issue with +a proposal for your work first, to be sure that we can use it. +Please consider what kind of change it is: + +* For a **Major Feature**, first open an issue and outline your proposal so that it can be +discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, +and help you to craft the change so that it is successfully accepted into the project. +* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). + +## Submission Guidelines + +### Submitting an Issue + +Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. + +We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction scenario using https://github.com/. Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like: + +- version of "Github Actions for Magento 2" used +- 3rd-party libraries and their versions +- and most importantly - a use-case that fails + +A minimal reproduce scenario using https://github.com/ allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. + +We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. + +Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced. + +You can file new issues by filling out our [new issue form](https://github.com/graycoreio/github-actions-magento2/issues/new/choose). + + +### Submitting a Pull Request (PR) +Before you submit your Pull Request (PR) consider the following guidelines: + +1. Search [GitHub](https://github.com/graycoreio/github-actions-magento2/pulls) for an open or closed PR + that relates to your submission. You don't want to duplicate effort. +1. Fork the [graycoreio/github-actions-magento2](https://github.com/graycoreio/github-actions-magento2) repo. +1. Make your changes in a new git branch: + + ```shell + git checkout -b my-fix-branch master + ``` + +1. Create your patch, **including appropriate test cases**. +1. Follow our [Coding Rules](#rules). +1. Run the full test suite, as described in the [developer documentation][dev-doc], + and ensure that all tests pass. +1. Commit your changes using a descriptive commit message that follows our + [commit message conventions](#commit). Adherence to these conventions + is necessary because release notes are automatically generated from these messages. + + ```shell + git commit -a + ``` + Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. + +1. Push your branch to GitHub: + + ```shell + git push origin my-fix-branch + ``` + +1. In GitHub, send a pull request to `github-actions-magento2:main`. +* If we suggest changes then: + * Make the required updates. + * Re-run the "Github Actions for Magento 2" test suites to ensure tests are still passing. + * Rebase your branch and force push to your GitHub repository (this will update your Pull Request): + + ```shell + git rebase main -i + git push -f + ``` + * Note: don't squash your branch until after the reviewers comment "lgtm", so they don't need to re-review your entire branch every commit. + +That's it! Thank you for your contribution! + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your branch and pull the changes +from the main (upstream) repository: + +* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: + + ```shell + git push origin --delete my-fix-branch + ``` + +* Check out the main branch: + + ```shell + git checkout main -f + ``` + +* Delete the local branch: + + ```shell + git branch -D my-fix-branch + ``` + +* Update your main with the latest upstream version: + + ```shell + git pull --ff upstream main + ``` + +## Coding Rules +To ensure consistency throughout the source code, keep these rules in mind as you are working: + +* All features or bug fixes **must be tested** by one or more specs (unit-tests). +* All public API methods **must be documented**. (Details TBC). + +## Commit Message Guidelines + +We have very precise rules over how our git commit messages can be formatted. This leads to **more +readable messages** that are easy to follow when looking through the **project history**. + +### Commit Message Format +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +