Skip to content

Commit f6b0e50

Browse files
authored
docs: update CONTRIBUTING and links (#966)
1 parent 89a2d0d commit f6b0e50

4 files changed

Lines changed: 127 additions & 218 deletions

File tree

CONTRIBUTING.md

Lines changed: 10 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,28 @@
1-
Contributing to GraphiQL
2-
========================
1+
# Contributing
32

43
We want to make contributing to this project as easy and transparent as
54
possible. Hopefully this document makes the process for contributing clear and
65
answers any questions you may have. If not, feel free to open an
7-
[Issue](https://github.com/facebook/graphql/issues).
6+
[Issue](https://github.com/graphql/graphiql/issues).
87

98
## Issues
109

1110
We use GitHub issues to track public bugs and requests. Please ensure your bug
1211
description is clear and has sufficient instructions to be able to reproduce the
1312
issue. The best way is to provide a reduced test case on jsFiddle or jsBin.
1413

15-
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
16-
disclosure of security bugs. In those cases, please go through the process
17-
outlined on that page and do not file a public issue.
18-
1914
## Pull Requests
2015

21-
All active development of GraphiQL happens on GitHub. We actively welcome
16+
All active development of this project happens on GitHub. We actively welcome
2217
your [pull requests](https://help.github.com/articles/creating-a-pull-request).
2318

2419
### Considered Changes
2520

26-
Since GraphiQL is used both internally at Facebook and by a broad group
27-
externally, changes which are of obvious benefit are prioritized and changes
28-
which are specific to only some usage of GraphiQL should first consider if they
29-
may use the existing customization hooks or if they should expose a new
30-
customization hook.
31-
32-
### Contributor License Agreement ("CLA")
33-
34-
In order to accept your pull request, we need you to submit a CLA. You only need
35-
to do this once to work on any of Facebook's open source projects.
36-
37-
Complete your CLA here: <https://code.facebook.com/cla>
21+
Since GraphiQL and related tools are used by a wide range of companies,
22+
individuals and other projects, changes which are of obvious benefit are
23+
prioritized and changes which are specific to only some usage of GraphiQL
24+
should first consider if they may use the existing customization hooks or if
25+
they should expose a new customization hook.
3826

3927
### Getting Started
4028

@@ -66,87 +54,9 @@ Complete your CLA here: <https://code.facebook.com/cla>
6654

6755
Our commit messages are linted by `commitlint` following the angular changelog convention. You may end up losing a commit message or two if you don't follow this rule. We can add a prompt if people ask for it. This was designed for compatiblity with various git clients.
6856

57+
## Releasing
6958

70-
## Cutting New Releases
71-
72-
We chose a manual process which is pretty simple and flexible because of our conventional commit messages.
73-
74-
If you have NPM privileges, you have the ability to cut new releases of the packages herein.
75-
76-
### Requirements
77-
78-
You'll need:
79-
- `GH_TOKEN` : a github user token as an environment variable
80-
- `git` command line installed, obviously!
81-
- to run `yarn adduser` first to ensure you're authenticated for publishing
82-
- your npm 2FA should be enabled, and you should have your second factor device handy for publish
83-
- your remote should be named `origin` for github, and should be the ssh url
84-
- (coming soon) GPG key uploaded to account for signing
85-
86-
Note: Ideally we can avoid publishing from any branch but `master`, but we can always `--allow-branch mybranch` in case of an emergency for pre-releases. _Whenever you can, always publish from `master`_.
87-
88-
### Prereleases
89-
90-
```sh
91-
yarn version:prerelease graphiql,codemirror-graphql
92-
```
93-
94-
Or
95-
96-
```sh
97-
yarn version:prerelease *
98-
```
99-
100-
for all packages.
101-
102-
It will automatically create and prompt you for each of the pre-release versions that reflect the conventional pattern from the commit log - so some packages may end up pre-alpha, others may be pre-minor, etc.
103-
104-
For example, if you made a change to `graphql-language-service-utils` there would be a new version for every single package. But if you made a change to `graphiql` in the commits since the last publish, there should only be a new pre-release version for `graphiql` when you run this command.
105-
106-
You can also `--amend` a previous release before publishing.
107-
108-
Once this is complete, run `publish:prerelease` to complete this process, so that we can ensure we use pre-release tags. And then you'll of course authenticate again with your 2FA device.
109-
110-
111-
### Graduating Prereleases
112-
113-
Now, after creating and publishing some pre-release versions, if you want to graduate them you can do so with a command that works in very much the same way as above.
114-
115-
```sh
116-
yarn version:graduate *
117-
```
118-
119-
Would graduate all pre-alphas to patch releases, pre-minors to minor releases, etc.
120-
121-
You can also give a comma seperated list of packages, or just a single one, as with `prereleases`
122-
123-
```sh
124-
yarn version:graduate codemirror-graphql
125-
```
126-
127-
then you can run
128-
129-
```sh
130-
yarn run publish:graduate
131-
```
132-
133-
And authenticate with 2FA
134-
135-
136-
### Full Releases
137-
138-
```sh
139-
yarn version:release
140-
```
141-
142-
Will automatically detect and generate changelog/etc with appropriate versions and entries for all subpackage, no need to supply package names or an asterisk
143-
144-
Then you can run
145-
```sh
146-
lerna publish
147-
```
148-
149-
And authenticate with 2FA
59+
Please see [the RELEASING.md document](./RELEASING.md).
15060

15161
## License
15262

RELEASING.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Cutting New Releases
2+
3+
We chose a manual process which is pretty simple and flexible because of our conventional commit messages.
4+
5+
If you have NPM privileges, you have the ability to cut new releases of the packages herein.
6+
7+
## Requirements
8+
9+
You'll need:
10+
11+
- `GH_TOKEN` : a github user token as an environment variable
12+
- `git` command line installed, obviously!
13+
- to run `yarn adduser` first to ensure you're authenticated for publishing
14+
- your npm 2FA should be enabled, and you should have your second factor device handy for publish
15+
- your remote should be named `origin` for github, and should be the ssh url
16+
- (coming soon) GPG key uploaded to account for signing
17+
18+
Note: Ideally we can avoid publishing from any branch but `master`, but we can always `--allow-branch mybranch` in case of an emergency for pre-releases. _Whenever you can, always publish from `master`_.
19+
20+
## Prereleases
21+
22+
```sh
23+
yarn version:prerelease graphiql,codemirror-graphql
24+
```
25+
26+
Or
27+
28+
```sh
29+
yarn version:prerelease *
30+
```
31+
32+
for all packages.
33+
34+
It will automatically create and prompt you for each of the pre-release versions that reflect the conventional pattern from the commit log - so some packages may end up pre-alpha, others may be pre-minor, etc.
35+
36+
For example, if you made a change to `graphql-language-service-utils` there would be a new version for every single package. But if you made a change to `graphiql` in the commits since the last publish, there should only be a new pre-release version for `graphiql` when you run this command.
37+
38+
You can also `--amend` a previous release before publishing.
39+
40+
Once this is complete, run `publish:prerelease` to complete this process, so that we can ensure we use pre-release tags. And then you'll of course authenticate again with your 2FA device.
41+
42+
## Graduating Prereleases
43+
44+
Now, after creating and publishing some pre-release versions, if you want to graduate them you can do so with a command that works in very much the same way as above.
45+
46+
```sh
47+
yarn version:graduate *
48+
```
49+
50+
Would graduate all pre-alphas to patch releases, pre-minors to minor releases, etc.
51+
52+
You can also give a comma seperated list of packages, or just a single one, as with `prereleases`
53+
54+
```sh
55+
yarn version:graduate codemirror-graphql
56+
```
57+
58+
then you can run
59+
60+
```sh
61+
yarn run publish:graduate
62+
```
63+
64+
And authenticate with 2FA
65+
66+
## Full Releases
67+
68+
```sh
69+
yarn version:release
70+
```
71+
72+
Will automatically detect and generate changelog/etc with appropriate versions and entries for all subpackage, no need to supply package names or an asterisk
73+
74+
Then you can run
75+
76+
```sh
77+
lerna publish
78+
```
79+
80+
And authenticate with 2FA

0 commit comments

Comments
 (0)