Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): contrib guidelines #342

Merged
merged 2 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Bug Report
description: Submit a bug report to help us improve
labels: [bug, 'status: needs triage']
body:
- type: markdown
attributes:
value: |
Before filing your issue, ask yourself:
- Is this clearly a NEAR JavaScript SDK defect?
- Do I have basic ideas about where it goes wrong? (For example, if there are stack traces, are they pointing to one file?)

**Please don't use issues for just questions**. For support please use [GitHub discussions](https://github.com/near/near-sdk-js/discussions).

The quickest way to verify whether it's a NEAR JavaScript SDK defect is through a **reproduction**, starting with a fresh project and making changes until the bug is reproduced.

- type: checkboxes
attributes:
label: Prerequisites
description: Please check the following items before creating a issue, these are basic sanity checks to make sure that the problem isn't something too obvious.
options:
- label: I'm using the latest version of `near-sdk-js`.
required: true
- label: I have tried to start with a fresh project and reproduce the defect with minimal code changes.
- label: I have read the console error messages carefully (if applicable).

- type: textarea
attributes:
label: Description
description: A clear and concise description of what the bug is.
validations:
required: true

- type: input
attributes:
label: Reproducible demo
description: |
(Optional) Paste the link to an example repo.

- type: textarea
attributes:
label: Steps to reproduce
description: Write down the steps to reproduce the bug.
placeholder: |
1. Step 1...
2. Step 2...
3. Step 3...
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: |
How did you expect your project to behave? If you’re unsure, write down what you thought would happen.
placeholder: Write what you thought would happen.
validations:
required: true

- type: textarea
attributes:
label: Actual behavior
description: |
Did something go wrong? Is something broken, or not behaving as you expected?
Describe this section in detail. Please submit complete log messages with the stack traces.
placeholder: Write what happened with any error messages.
validations:
required: true

- type: textarea
attributes:
label: Your environment
description: Include as many relevant details about the environment you experienced the bug in.
value: |
- NEAR JavaScript SDK version used:
- Relevant dependencies (if applicable):

- type: checkboxes
attributes:
label: Self-service
description: |
If you feel like you could contribute to this issue, please check the box below.
If you do check this box, please send a pull request within 7 days so we can still delegate this to someone else.
options:
- label: I'd be willing to fix this bug myself.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 🚀 Feature request & ❓ Questions
url: https://github.com/near/near-sdk-js/discussions
about: Use GitHub discussions for feature requests and questions.
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Feature design / RFC
description: Submit a detailed feature request with a concrete proposal, including an exhaustive API design
labels: [ feature, 'status: needs triage' ]
body:
- type: markdown
attributes:
value: |
Important things:

- This is for feature request including a real API design, not just a basic idea.
- The design does not have to be perfect, we'll discuss it if needed.
- For a more "casual" feature request, consider using GitHub Discussions instead: https://github.com/near/near-sdk-js/discussions/categories/ideas


- type: checkboxes
attributes:
label: Have you read the Contributing Guidelines?
options:
- label: I have read the [Contributing Guidelines on issues](https://github.com/near/near-sdk-js/blob/master/CONTRIBUTING.md).
required: true

- type: textarea
attributes:
label: Description
description: A clear and concise description of what the feature is.
validations:
required: true

- type: input
attributes:
label: Has this been requested on GitHub Discussions?
description: Please post the [GitHub Discussions](https://github.com/near/near-sdk-js/discussions/categories/ideas) link, it is helpful to see how much interest there is for this feature.

- type: textarea
attributes:
label: Motivation
description: Please outline the motivation for the proposal and why it should be implemented.
validations:
required: true

- type: textarea
attributes:
label: API design
description: |
Please describe how users will use this feature.

Please explain in an exhaustive way what are the config options and their respective effects.

> **What happens if you skip this step?** This issue may be closed without any in-depth discussion. Your feature request is just an idea for now, please use GitHub Discussions for that: https://github.com/near/near-sdk-js/discussions/categories/ideas


- type: checkboxes
attributes:
label: Self-service
description: |
If you feel like you could contribute to this issue, please check the box below.
If you do check this box, please send a pull request within 7 days so we can still delegate this to someone else.

Note that for feature issues, we still require you to fully fill out this form and reach consensus with the maintainers on API design before rushing to implement it, so that you don't waste your time.
options:
- label: I'd be willing to contribute and develop this feature myself.
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
You can learn more about contributing to NEAR JavaScript SDK here: https://github.com/near/near-sdk-js/blob/master/CONTRIBUTING.md
Happy contributing!
-->

## Pre-flight checklist

- [ ] I have read the [Contributing Guidelines on pull requests](https://github.com/near/near-sdk-js/blob/master/CONTRIBUTING.md).
- [ ] Commit messages follow the [conventional commits](https://www.conventionalcommits.org/) spec
- [ ] **If this is a code change**: I have written unit tests.
- [ ] **If this is a new API or substantial change**: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

## Motivation

<!-- Help us understand your motivation by explaining why you decided to make this change. Does this fix a bug? Does it close an issue? -->

## Test Plan

<!-- Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. -->

## Related issues/PRs

<!-- If you haven't already, link to issues/PRs that are related to this change. This helps us develop the context and keep a rich repo history. If this PR is a continuation of a past PR's work, link to that PR. If the PR addresses part of the problem in a meta-issue, mention that issue. -->
123 changes: 109 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,121 @@
# Contributing to NEAR
# Contributing to Near JavaScript SDK

NEAR welcomes help in many forms including development, code review, documentation improvements, and outreach.
Please visit [the contribution overview](https://docs.nearprotocol.com/docs/contribution/contribution-overview) for more information.
First off, thanks for taking the time to contribute! We look forward to to your contributions. 🎉

## Using Github issues and pull requests
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them.

Some repositories have specific issue templates that will be helpful for maintainers and community contributors. Please use the templates whenever available.
We take community contributions very seriously, as we understand you invest precious time and effort. That is why we have this guide to set mutual expectations, to avoid unfortunate situation where we can't accept a contribution because it may not fit project's goals, or lacks needed quality standards. There is one important rule to follow - please let us know ahead about what you plan to do, and get an OK from our team so that we can prepare for accepting your contribution.

Please include steps to reproduction, if reporting an error. Information on all applicable versions is quite helpful. Some versions can be found using the command line. (For example: `node --version` or `rustc --version`.) Other version information may be packaged as dependencies. (For example: in `package.json` or `Cargo.toml`.)
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
> - Star the project
> - Tweet about it
> - Refer this project in your project's readme
> - Mention the project at local meetups and tell your friends/colleagues

If there are verbosity flags available, please include those to offer as much information as possible.
## Table of Contents

When opening a pull request, please use the typical open-source flow of forking the desired repository and opening a pull request from your forked repository. (More information on [technical contributions here](https://docs.nearprotocol.com/docs/contribution/technical-contribution).)
- [I Have a Question](#i-have-a-question)
- [Get Involved](#get-involved)
- [Our Development Process](#our-development-process)
- [Development](#development)
- [Pull Requests](#pull-requests)
- [Tests](#tests)
- [What Happens Next?](#what-happens-next)

## Testing
## I Have a Question

Please note that for technical contributions, NEAR runs a battery of continuous integration tools and tests for each pull request.
If you want to ask a question please use the following resources available for you:

It's encouraged to write unit tests on new features. Many NEAR repositories have built-in scripts that run tests locally. Tests may check linting and must be addressed.
- [Docs site](https://docs.near.org/sdk/js/introduction)
- Post a question on [GitHub Discussions](https://github.com/near/near-sdk-js/discussions)
- Post a question on [StackOverflow with `[nearprotocol]` tag](https://stackoverflow.com/questions/tagged/nearprotocol)

For this repository, please follow testing directions outlined in the `README.md` file.

### Thank you
## Get Involved

NEAR values all contributors to the projects in the ecosystem and invites public discussion on the tech and vision. Please feel free to join the conversation using the links offered at [near.help](https://near.help).
There are many ways to contribute to this project, and many of them do not involve writing any code. Here's a few ideas to get started:

- Simply start using the library. Go through the [user guide](https://docs.near.org/sdk/js/introduction). Does everything work as expected? If not, we're always looking for improvements. Let us know on [GitHub Discussions](https://github.com/near/near-sdk-js/discussions).
- Look through the [open issues](https://github.com/near/near-sdk-js/issues). Provide workarounds or ask for clarification.
- If you find an issue you would like to fix, [open a pull request](#pull-requests). Issues tagged as [_Good first issue_](https://github.com/near/near-sdk-js/labels/good_first_issue) are a good place to get started.
- Take a look at the [enhancements requested](https://github.com/near/near-sdk-js/labels/enhancement) by others in the community and consider opening a pull request if you see something you want to work on.

If you think you need help planning your contribution, please ping us on [Discord](https://near.chat) and let us know you are looking for a bit of help.

### Join our Discord Channel

We have the [`#dev-feedback`](https://discord.gg/XKGrd9h9TB) channel on [Discord](https://near.chat) to discuss all things about NEAR development. You can also be of great help by helping other users in the [`#dev-support`](https://discord.gg/Fy4WzwRgun) channel.

### Join our Telegram User Group
You can have near-sdk-js related discussions with other users, contributors and maintainers on [Telegram]( https://t.me/near_sdk_js).

### Triaging Issues and Pull Requests

One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in.

You can review code, or ask for more information if you believe the issue does not provide all the details required to solve it.

## Our Development Process

Our core team works directly in the public repo, and pull requests are checked by the continuous integration system, GitHub actions. There are unit tests and end-to-end tests.

**Branch organization**: This project has one primary branch `develop` and we use feature branches to deliver new features with pull requests.

**Issue templates**: When [opening a new issue](https://github.com/near/near-sdk-js/issues/new/choose), always **make sure to fill out the issue template**. The issue template is very important, as it sets mutual expectations about what you plan to do, and help us prepare to accept your contribution.

**Bugs**: If you would like to report a problem use the [bug report](https://github.com/near/near-sdk-js/issues/new?assignees=&template=bug.yml) issue template.

**Security Bugs**: To report security issues in this project please email [security@near.org](mailto:security@near.org)

**New features and enhancements**:

If you have a casual feature request or proposal, you can raise it in our [GitHub Discussions](https://github.com/near/near-sdk-js/discussions/categories/ideas).

If you'd like to work on a PR with an implementation of your proposal, please file an issue with the [feature template](https://github.com/near/near-sdk-js/issues/new?template=feature.yml) in the form of an **elaborated RFC**. Please wait for our team to respond with an approval before you start working on it, as we can only accept PRs that are aligned with project's goals and roadmap, so we really want to avoid situations where we reject something you worked hard on. (BTW, if you think that project's goals or roadmap should change in some way, do feel free to raise it in [GitHub Discussions](https://github.com/near/near-sdk-js/discussions/) :) and we'll talk about it).

### Claiming issues

We have a list of [beginner-friendly issues](https://github.com/near/near-sdk-js/labels/good_first_issue) to help you get started with the codebase and get familiar with our contribution process. This is a great place to start.

Apart from the `good first issue`, the following labels are also worth looking at:

- [`help wanted`](https://github.com/near/near-sdk-js/labels/help%20wanted): if you have specific knowledge in one domain, working on these issues can make your expertise shine.
- [`accepting pr`](https://github.com/near/near-sdk-js/labels/status%3A%20accepting%20pr): community contributors can feel free to claim any of these.

If you want to work on any of these issues, just drop a message saying "I'd like to work on this", and we will assign the issue to you and update the issue's status as "claimed". **You are expected to send a pull request within seven days** after that, so we can still delegate the issue to someone else if you are unavailable.

## Development

### Online one-click setup for contributing

You can use Gitpod (a free, online, VSCode-like IDE) for contributing. With a single click, it will launch a workspace and automatically:

- clone the repo.
- install the dependencies.

So that you can start contributing straight away.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/near/near-sdk-js)

## Pull Requests

We appreciate the time and effort you invested! 🙏 We will do our best to work with you and get the PR looked at.

> Working on your first-ever Pull Request? You can learn how from this free video series:
> [**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)

Please make sure the following is done when submitting a pull request:

1. **Keep your PR small.** Small pull requests (~300 lines of diff) are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
2. **Use descriptive titles.** It is recommended to follow semantic commit conventions: https://www.conventionalcommits.org/en/v1.0.0/
3. **Test your changes.** Include unit tests for any public API you touch.

All pull requests should be opened against the `develop` branch.

### Tests

Please include unit tests for any public api you add or touch. We use [AVA](https://github.com/avajs/ava) for tests.

### What Happens Next?

Our team will be monitoring pull requests. Do help us by keeping pull requests consistent by following the guidelines above.
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy

## Reporting a Vulnerability

To report security issues in this project please send an email to [security@near.org](mailto:security@near.org)