|
1 | | -Contributing to GraphiQL |
2 | | -======================== |
| 1 | +# Contributing |
3 | 2 |
|
4 | 3 | We want to make contributing to this project as easy and transparent as |
5 | 4 | possible. Hopefully this document makes the process for contributing clear and |
6 | 5 | 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). |
8 | 7 |
|
9 | 8 | ## Issues |
10 | 9 |
|
11 | 10 | We use GitHub issues to track public bugs and requests. Please ensure your bug |
12 | 11 | description is clear and has sufficient instructions to be able to reproduce the |
13 | 12 | issue. The best way is to provide a reduced test case on jsFiddle or jsBin. |
14 | 13 |
|
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 | | - |
19 | 14 | ## Pull Requests |
20 | 15 |
|
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 |
22 | 17 | your [pull requests](https://help.github.com/articles/creating-a-pull-request). |
23 | 18 |
|
24 | 19 | ### Considered Changes |
25 | 20 |
|
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. |
38 | 26 |
|
39 | 27 | ### Getting Started |
40 | 28 |
|
@@ -66,87 +54,9 @@ Complete your CLA here: <https://code.facebook.com/cla> |
66 | 54 |
|
67 | 55 | 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. |
68 | 56 |
|
| 57 | +## Releasing |
69 | 58 |
|
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). |
150 | 60 |
|
151 | 61 | ## License |
152 | 62 |
|
|
0 commit comments