Skip to content

Commit

Permalink
Adding contribution related docs (#375)
Browse files Browse the repository at this point in the history
* adding contribution related docs

Co-authored-by: Rez <[email protected]>
  • Loading branch information
lukasoppermann and rezrah authored Oct 20, 2022
1 parent dd2b7e2 commit 3370408
Show file tree
Hide file tree
Showing 5 changed files with 265 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: '🐛 Bug'
description: Report a bug to help us improve Primer Primitives.
title: '🐛 [BUG] - <title>'
labels: ['bug']
body:
- type: textarea
id: description
attributes:
label: 'Describe the bug'
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reprod
attributes:
label: 'Reproduction steps'
description: Please provide clear and accurate steps to reproduce the bug.
value: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
render: bash
validations:
required: true
- type: textarea
id: expected
attributes:
label: 'Expected behavior'
description: Please enter a clear and concise description of what you expected to happen.
value: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
render: bash
validations:
required: true
- type: textarea
id: screenshot
attributes:
label: 'Screenshots'
description: If applicable, add screenshots to help illustrate your problem.
value: |
![DESCRIPTION](LINK.png)
render: bash
validations:
required: false
53 changes: 53 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## Summary

<!--
A few sentences describing the changes being proposed in this pull request.
-->

## List of notable changes:

<!--
E.g.
- **added** new design token for # because #
- **deprecated** design token for # because #
- **updated** documentation for # because #
-->

-

## What should reviewers focus on?

-

## Steps to test:

<!--
Help reviewers test the feature by providing steps to reproduce the behavior.
1. Open the preview documentation that has been deployed in this pull request
2. Go to # page
3. Verify that # behaves as described in the pull request description
1.
1.
1.
## Supporting resources (related issues, external links, etc):
-
## Contributor checklist:
- [ ] All new and existing CI checks pass
- [ ] Tests prove that the feature works and covers both happy and unhappy paths
- [ ] Any drop in coverage, breaking changes or regressions have been documented above
- [ ] All developer debugging and non-functional logging has been removed
- [ ] Related issues have been referenced in the PR description
## Reviewer checklist:
- [ ] Check that pull request and proposed changes adhere to our [contribution guidelines](../../CONTRIBUTING.md) and [code of conduct](../../CODE_OF_CONDUCT.md)
- [ ] Check that tests prove the feature works and covers both happy and unhappy paths
- [ ] Check that there aren't other open Pull Requests for the same update/change
- [ ] Verify the design tokens changed in this PR are expected using the diffing results in this PR
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 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, sex characteristics, 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 any behavior 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 team at [email protected]. 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

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
62 changes: 62 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
## Contributing

We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.

## Using the issue tracker

The [issue tracker](https://github.com/primer/primitives/issues) is the preferred channel for [bug reports](#bug-reports) and [submitting pull requests](#pull-requests), but please respect the following restrictions:

- Please **do not** use the issue tracker for personal support requests.
- Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.

## Bug reports

A bug is a _demonstrable and reproducible problem_ that is caused by the code in the repository. Good bug reports are extremely helpful to the project, so thanks!

Guidelines for bug reports:

1. **Use the GitHub issue search** &mdash; check if the issue has already been reported.

1. **Check if the issue has been fixed** &mdash; try to reproduce the bug using the latest `main` branch in the repository. The latest npm release, isn't always the representative version of the code.

1. **Isolate the problem** &mdash; ideally create a isolated example, using a 'vanilla' configuration of your chosen framework. CodeSandbox and StackBlitz offer an easy way to do this.

[Use the issue template to help you report bugs](https://github.com/primer/primitives/issues/new?assignees=&labels=bug&template=BUG-REPORT.yml&title=%F0%9F%90%9B+%5BBUG%5D+-+%3Ctitle%3E), if you're confident the bug is still valid.

## Pull requests

Good pull requests are a fantastic help. They should remain focused in scope and avoid containing code and commits unrelated to the problem or feature you're adding.

**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.

### Updating Primer Primitives

1. Clone [this repository](https://github.com/primer/primitives).
1. Create a new feature branch: `git checkout -b my-handle/my-branch-name`.
1. Configure and install the dependencies: `npm install --legacy-peer-deps`
1. Make your changes and commit them.
1. Create a changeset for your changes if your contribution affects distributed code: `npx changeset`
- See [changesets/changesets](https://github.com/changesets/changesets) for more information.
1. Push your branch and open a pull request. **Please use the supplied pull request template**.
1. Wait for CI tests to complete.
- If the tests pass, you should see a status check advising you that a canary build of `@primer/primitives` has been published, and ready to test in-app.
- If the tests fail, review the logs and address any issues.
- If the builds fail for any other reason (as they occasionally do), they may need to be manually restarted.
1. 🙌 Nice job! Sit back and wait for your pull request to be reviewed.

Here are a few things you can do that will increase the likelihood of your pull request being accepted:

- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).

## Releasing a new Primer Primitives version

See [RELEASING.md](RELEASING.md) for our release process.

## Resources

- [Using Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
- [GitHub Help](https://docs.github.com)

[fork]: https://github.com/primer/primitives/fork
[pr]: https://github.com/primer/primitives/compare
26 changes: 26 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Releasing a new version of Primer Primitives

## Prepare the release

The Primer Primitives release process is automated using [Changesets] and GitHub Actions.

1. Visit the pull requests page and find the latest, open ["release tracking" pull request from primer-css](https://github.com/primer/primitives/pulls/primer-css). If there isn't one, we'll need to build the next release by merging in PRs with changeset files.

## Test the release candidate (GitHub staff only):

1. Ensure test automation checks have completed and passed

1. Install and smoke test the Release Candidate on at least one consumer application.

1. Review the [change log] for accuracy and completeness.

## Publish the release

1. If the release PR is approved and you've done necessary testing, merge it.

After additional CI checks finish, the docs site will be deployed and `@primer/primitives` will be published with your changes to the `latest` dist-tag. You can check [npm](https://www.npmjs.com/package/@primer/primitives?activeTab=versions) to see if actions has finished.

1. You're done 🎉

[change log]: ./CHANGELOG.md
[changesets]: https://github.com/atlassian/changesets

0 comments on commit 3370408

Please sign in to comment.