Skip to content

Commit e367c0f

Browse files
cesarsolorzanoSashko Stubailo
authored andcommitted
Add contributors docs (apollographql#85)
1 parent 7977cec commit e367c0f

6 files changed

Lines changed: 222 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Apollo Contributor Guide
2+
3+
Excited about Apollo and want to make it better? We’re excited too!
4+
5+
Apollo is a community of developers just like you, striving to create the best tools and libraries around GraphQL. We welcome anyone who wants to contribute or provide constructive feedback, no matter the age or level of experience. If you want to help but don't know where to start, let us know, and we'll find something for you.
6+
7+
Oh, and if you haven't already, sign up for the [Apollo Slack](http://www.apollodata.com/#slack).
8+
9+
Here are some ways to contribute to the project, from easiest to most difficult:
10+
11+
* [Reporting bugs](#reporting-bugs)
12+
* [Improving the documentation](#improving-the-documentation)
13+
* [Responding to issues](#responding-to-issues)
14+
* [Small bug fixes](#small-bug-fixes)
15+
* [Suggesting features](#feature-requests)
16+
* [Big pull requests](#big-prs)
17+
18+
## Issues
19+
20+
### Reporting bugs
21+
22+
If you encounter a bug, please file an issue on GitHub via the repository of the sub-project you think contains the bug. If an issue you have is already reported, please add additional information or add a 👍 reaction to indicate your agreement.
23+
24+
While we will try to be as helpful as we can on any issue reported, please include the following to maximize the chances of a quick fix:
25+
26+
1. **Intended outcome:** What you were trying to accomplish when the bug occurred, and as much code as possible related to the source of the problem.
27+
2. **Actual outcome:** A description of what actually happened, including a screenshot or copy-paste of any related error messages, logs, or other output that might be related. Places to look for information include your browser console, server console, and network logs. Please avoid non-specific phrases like “didn’t work” or “broke”.
28+
3. **How to reproduce the issue:** Instructions for how the issue can be reproduced by a maintainer or contributor. Be as specific as possible, and only mention what is necessary to reproduce the bug. If possible, build a reproduction with our [error template](https://github.com/apollographql/react-apollo-error-template) to isolate the exact circumstances in which the bug occurs. Avoid speculation over what the cause might be.
29+
30+
Creating a good reproduction really helps contributors investigate and resolve your issue quickly. In many cases, the act of creating a minimal reproduction illuminates that the source of the bug was somewhere outside the library in question, saving time and effort for everyone.
31+
32+
### Improving the documentation
33+
34+
Improving the documentation, examples, and other open source content can be the easiest way to contribute to the library. If you see a piece of content that can be better, open a PR with an improvement, no matter how small! If you would like to suggest a big change or major rewrite, we’d love to hear your ideas but please open an issue for discussion before writing the PR.
35+
36+
### Responding to issues
37+
38+
In addition to reporting issues, a great way to contribute to Apollo is to respond to other peoples' issues and try to identify the problem or help them work around it. If you’re interested in taking a more active role in this process, please go ahead and respond to issues. And don't forget to say "Hi" on Apollo Slack!
39+
40+
### Small bug fixes
41+
42+
For a small bug fix change (less than 20 lines of code changed), feel free to open a pull request. We’ll try to merge it as fast as possible and ideally publish a new release on the same day. The only requirement is, make sure you also add a test that verifies the bug you are trying to fix.
43+
44+
### Suggesting features
45+
46+
Most of the features in Apollo came from suggestions by you, the community! We welcome any ideas about how to make Apollo better for your use case. Unless there is overwhelming demand for a feature, it might not get implemented immediately, but please include as much information as possible that will help people have a discussion about your proposal:
47+
48+
1. **Use case:** What are you trying to accomplish, in specific terms? Often, there might already be a good way to do what you need and a new feature is unnecessary, but it’s hard to know without information about the specific use case.
49+
2. **Could this be a plugin?** In many cases, a feature might be too niche to be included in the core of a library, and is better implemented as a companion package. If there isn’t a way to extend the library to do what you want, could we add additional plugin APIs? It’s important to make the case for why a feature should be part of the core functionality of the library.
50+
3. **Is there a workaround?** Is this a more convenient way to do something that is already possible, or is there some blocker that makes a workaround unfeasible?
51+
52+
Feature requests will be labeled as such, and we encourage using GitHub issues as a place to discuss new features and possible implementation designs. Please refrain from submitting a pull request to implement a proposed feature until there is consensus that it should be included. This way, you can avoid putting in work that can’t be merged in.
53+
54+
Once there is a consensus on the need for a new feature, proceed as listed below under “Big PRs”.
55+
56+
## Big PRs
57+
58+
This includes:
59+
60+
- Big bug fixes
61+
- New features
62+
63+
For significant changes to a repository, it’s important to settle on a design before starting on the implementation. This way, we can make sure that major improvements get the care and attention they deserve. Since big changes can be risky and might not always get merged, it’s good to reduce the amount of possible wasted effort by agreeing on an implementation design/plan first.
64+
65+
1. **Open an issue.** Open an issue about your bug or feature, as described above.
66+
2. **Reach consensus.** Some contributors and community members should reach an agreement that this feature or bug is important, and that someone should work on implementing or fixing it.
67+
3. **Agree on intended behavior.** On the issue, reach an agreement about the desired behavior. In the case of a bug fix, it should be clear what it means for the bug to be fixed, and in the case of a feature, it should be clear what it will be like for developers to use the new feature.
68+
4. **Agree on implementation plan.** Write a plan for how this feature or bug fix should be implemented. What modules need to be added or rewritten? Should this be one pull request or multiple incremental improvements? Who is going to do each part?
69+
5. **Submit PR.** In the case where multiple dependent patches need to be made to implement the change, only submit one at a time. Otherwise, the others might get stale while the first is reviewed and merged. Make sure to avoid “while we’re here” type changes - if something isn’t relevant to the improvement at hand, it should be in a separate PR; this especially includes code style changes of unrelated code.
70+
6. **Review.** At least one core contributor should sign off on the change before it’s merged. Look at the “code review” section below to learn about factors are important in the code review. If you want to expedite the code being merged, try to review your own code first!
71+
7. **Merge and release!**
72+
73+
### Code review guidelines
74+
75+
It’s important that every piece of code in Apollo packages is reviewed by at least one core contributor familiar with that codebase. Here are some things we look for:
76+
77+
1. **Required CI checks pass.** This is a prerequisite for the review, and it is the PR author's responsibility. As long as the tests don’t pass, the PR won't get reviewed.
78+
2. **Simplicity.** Is this the simplest way to achieve the intended goal? If there are too many files, redundant functions, or complex lines of code, suggest a simpler way to do the same thing. In particular, avoid implementing an overly general solution when a simple, small, and pragmatic fix will do.
79+
3. **Testing.** Do the tests ensure this code won’t break when other stuff changes around it? When it does break, will the tests added help us identify which part of the library has the problem? Did we cover an appropriate set of edge cases? Look at the test coverage report if there is one. Are all significant code paths in the new code exercised at least once?
80+
4. **No unnecessary or unrelated changes.** PRs shouldn’t come with random formatting changes, especially in unrelated parts of the code. If there is some refactoring that needs to be done, it should be in a separate PR from a bug fix or feature, if possible.
81+
5. **Code has appropriate comments.** Code should be commented, or written in a clear “self-documenting” way.
82+
6. **Idiomatic use of the language.** In TypeScript, make sure the typings are specific and correct. In ES2015, make sure to use imports rather than require and const instead of var, etc. Ideally a linter enforces a lot of this, but use your common sense and follow the style of the surrounding code.

DESIGNS.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Apollo Design Documents
2+
3+
A design document is a way to communicate to others what the intent behind a certain feature/solution is. In the Apollo community we use them to facilitate discussions and reach agreement about important design decisions.
4+
5+
Design docs are written with the purpose of helping community members and contributors understand design proposals and judge them on their merits.
6+
7+
A good design document should:
8+
- state the problem that is being solved as clearly as possible
9+
- explain why the problem should be solved in this package, and not a different one (or possibly a new one)
10+
- show that the proposed solution fits in with the stated vision for Apollo Client
11+
- incrementally adoptable
12+
- universally compatible
13+
- easy to understand and use
14+
- compare the proposed solution with obvious alternatives and show that
15+
- the proposed solution is better than its alternatives with respect to the Apollo vision.
16+
17+
For an example of a design doc, see [Apollo Errors](https://github.com/apollographql/apollo-client/blob/master/designs/errors.md).

ISSUE_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--
2+
Thanks for filing an issue on Apollo!
3+
4+
Please make sure that you include the following information to ensure that your issue is actionable.
5+
6+
If you don't follow the template, your issue may end up being closed without anyone looking at it carefully, because it is not actionable for us without the information in this template.
7+
8+
If you're filing a feature request, you do not need to follow the outline below, but please include "feature idea" in the title and include a specific example in which that feature would be useful.
9+
-->
10+
11+
**Intended outcome:**
12+
<!--
13+
What you were trying to accomplish when the bug occurred, and as much code as possible related to the source of the problem.
14+
-->
15+
16+
**Actual outcome:**
17+
<!--
18+
A description of what actually happened, including a screenshot or copy-paste of any related error messages, logs, or other output that might be related. Places to look for information include your browser console, server console, and network logs. Please avoid non-specific phrases like “didn’t work” or “broke”.
19+
-->
20+
21+
**How to reproduce the issue:**
22+
<!--
23+
If possible, please create a reproduction using https://github.com/apollographql/react-apollo-error-template and link to it here.
24+
25+
Instructions for how the issue can be reproduced by a maintainer or contributor. Be as specific as possible, and only mention what is necessary to reproduce the bug. If possible, try to isolate the exact circumstances in which the bug occurs and avoid speculation over what the cause might be.
26+
-->
27+
28+
29+
30+

IssueTriageFlow.png

148 KB
Loading

PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
Thanks for filing a pull request on Apollo!
3+
4+
Please look at the following checklist to ensure that your PR
5+
can be accepted quickly:
6+
-->
7+
8+
TODO:
9+
10+
- [ ] If this PR is a new feature, reference an issue where a consensus about the design was reached (not necessary for small changes)
11+
- [ ] Make sure all of the significant new logic is covered by tests
12+
- [ ] Rebase your changes on master so that they can be merged easily
13+
- [ ] Make sure all tests and linter rules pass
14+
- [ ] Update CHANGELOG.md with your change
15+
- [ ] Add your name and email to the AUTHORS file (optional)
16+
- [ ] If this was a change that affects the external API, update the docs and post a link to the PR in the discussion

issueTriage.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Issue Triage
2+
3+
This document describes the process Apollo contributors use to organize issues. We use Github [issues](https://github.com/apollographql/apollo-client/issues) to track bugs and feature requests. Our goal is to maintain a list of issues that are relevant and well-defined (and [labeled](https://github.com/apollographql/apollo-client/labels)) such that a contributor can immediately begin working on the code for a fix or feature request. Contributors who want to dive in and write code aren't likely to prioritize working on issues that are ambiguous and have low impact.
4+
5+
We would love to have more contributors who are willing to help out with triaging issues. You can begin by helping issue requesters create good reproductions and by confirming those reproductions on your own machine. It won't be long before the core maintainers notice your work and ask whether you'd like to be promoted to an issue maintainer.
6+
7+
- [Issue lifecycle](#issue-lifecycle)
8+
- [Bugs](#bugs)
9+
- [Help questions](#help-questions)
10+
- [Feature requests](#feature-requests)
11+
- [Classification](#classification)
12+
- [Severity](#severity)
13+
- [Impact](#impact)
14+
- [Issues ready to claim](#issues-ready-to-claim)
15+
16+
## Issue lifecycle
17+
18+
All issues follow the flow outlined below. Your job as an issue maintainer is to work with the requester and others within the community towards the goal of having an issue either become 'claimable' or closed. Read on for more details on the process.
19+
20+
![Flowchart](IssueTriageFlow.png "Issue Lifecycle")
21+
22+
The first step is in determining whether the issue is a bug, help question or feature request. Read on for more details.
23+
24+
### Bugs
25+
26+
1. Duplicates should be closed and marked as such.
27+
2. If the bug would be better filed under a different repository (react-apollo, graphql-tag, graphql-anywhere, etc. ), close the issue and politely point the author to the right location.
28+
3. Add the `bug` label. Bugs should have a high-quality reproduction as described [here](CONTRIBUTING.md#reporting-bugs). You may need to help the reporter reduce their bug to a minimal reproduction. Leave the issue open.
29+
5. A reproduction should be confirmed by at least one person other than the original reporter. Run the reproduction and validate that the bug exists; then make a note of your findings on the issue. If a reproduction is supplied but doesn't work, add the `can't-reproduce` label and make a comment describing what happened.
30+
6. Finally, once you've confirmed the reproduction add the `confirmed` label and [classify](#classification) the issue (removing the `can't-reproduce` label if it exists).
31+
32+
### Help questions
33+
34+
[Stack Overflow](http://stackoverflow.com/questions/tagged/apollo) and our [Slack channel](http://dev.apollodata.com/#slack) are the place to ask for help on using the framework. Close issues that are help requests and politely refer the author to the above locations.
35+
36+
### Feature requests
37+
38+
1. For reasons described [here](CONTRIBUTING.md#feature-requests), we would prefer features to be built as separate packages. If the feature can clearly be built as a package, explain this to the requester and close the issue.
39+
> - If the feature could be built as a package and serves a particular need, encourage the user to contribute it themselves.
40+
>- If the underlying issue could be better solved by existing technology, encourage them to seek help in the [Slack channel](http://dev.apollodata.com/#slack) or on [Stack Overflow](http://stackoverflow.com/questions/tagged/apollo).
41+
2. If you haven't closed the issue, add the `feature` label.
42+
3. If it's not possible to build the feature as a package (as you identified in step 1), explore whether creating hooks in core would make it possible to do so. If it would, redefine the issue as a request to create those hooks.
43+
4. Work with the requester and others in the community to build a clear specification for the feature and update the issue description accordingly.
44+
5. Finally, add the `confirmed` label and [classify](#classification) the issue.
45+
46+
Core contributors may add the `pull-requests-encouraged` label to feature requests. This indicates the feature is aligned with the project roadmap and a high-quality pull request will almost certainly be merged.
47+
48+
<h2 id="classification">Classification</h2>
49+
50+
Assign a classification (via GH labels) that enables the community to determine how to prioritize which issues to work on. The classification is based on *Severity x Impact* .
51+
52+
### Severity
53+
_[Severity:has-workaround, Severity:production, Severity:blocks-development]_
54+
55+
- If there is a workaround, apply the `Severity:has-workaround` label.
56+
- If the issue affects production apps, apply the `Severity:production` label.
57+
- If the issue blocks development, apply the `Severity:blocks-development` label.
58+
59+
### Impact
60+
_[Impact:few, Impact:some, Impact:most]_
61+
62+
This is a somewhat subjective label and is interpreted in conjunction with Github's upvotes. As a general guideline:
63+
64+
- `Impact:few` issues would go unnoticed by almost all users, apart from those using a very niche feature, or a feature in an unusual way.
65+
- `Impact:some` issues would impact users using a feature that is commonly but not universally used.
66+
- `Impact:most` issues would impact more or less every user of Apollo.
67+
68+
## Issues ready to claim
69+
70+
This state indicates that bugs/feature requests have reached the level of quality
71+
required for a contributor to begin writing code against (you can easily [filter for this list](https://github.com/apollographql/apollo-client/labels/confirmed) by using the `confirmed` label).
72+
73+
Although this should have already been done by this stage, ensure the issue is
74+
correctly labeled and the title/description have been updated to reflect an
75+
accurate summary of the issue.
76+
77+
Contributors should comment on and/or assign themselves an issue if they begin working on it so that others know work is in progress.

0 commit comments

Comments
 (0)