You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Help us keep Cannon open and inclusive. Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).
13
14
14
15
## <aname="question"></a> Got a Question or Problem?
@@ -18,52 +19,56 @@ Do not open issues for general support questions as we want to keep GitHub issue
18
19
If you would like to chat about the question in real-time, you can reach out via [our discord channel][discord].
19
20
20
21
## <aname="issue"></a> Found a Bug?
22
+
21
23
If you find a bug in the source code, you can help us by
22
24
[submitting an issue](#submit-issue) to our [GitHub Repository](https://github.com/usecannon/cannon/). Even better, you can
23
25
[submit a Pull Request](#submit-pr) with a fix.
24
26
25
27
## <aname="feature"></a> Missing a Feature?
26
-
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub
27
-
Repository. If you would like to *implement* a new feature, please submit an issue with
28
+
29
+
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub
30
+
Repository. If you would like to _implement_ a new feature, please submit an issue with
28
31
a proposal for your work first, to be sure that we can use it.
29
32
Please consider what kind of change it is:
30
33
31
-
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
32
-
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
33
-
and help you to craft the change so that it is successfully accepted into the project.
34
-
***Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
34
+
- For a **Major Feature**, first open an issue and outline your proposal so that it can be
35
+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
36
+
and help you to craft the change so that it is successfully accepted into the project.
37
+
-**Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
35
38
36
39
## <aname="rules"></a> Coding Rules
40
+
37
41
To ensure consistency throughout the source code, keep these rules in mind as you are working:
38
42
39
-
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
40
-
* All public Cannonfile Config actions and CLI commands **must be documented**.
41
-
* We follow [Google's Typescript Style Guide](https://google.github.io/styleguide/tsguide.html).
43
+
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
44
+
- All public Cannonfile Config actions and CLI commands **must be documented**.
45
+
- We follow [Google's Typescript Style Guide](https://google.github.io/styleguide/tsguide.html).
42
46
43
47
We would love for you to contribute to cannon and help make it even better than it is
44
48
today! As a contributor, here are the guidelines we would like you to follow:
45
49
46
-
-[Code of Conduct](#coc)
47
-
-[Commit Message Guidelines](#commit)
50
+
-[Code of Conduct](#coc)
51
+
-[Commit Message Guidelines](#commit)
48
52
49
53
## <aname="version"></a> Versioning
50
-
We follow the [SemVer](https://semver.org/) or Semantic Versioning strategy, please review their guidelines to ensure you understand the requirements for
54
+
55
+
We follow the [SemVer](https://semver.org/) or Semantic Versioning strategy, please review their guidelines to ensure you understand the requirements for
51
56
bumping versions.
52
-
57
+
53
58
## <aname="commit"></a> Commit Message Guidelines
54
59
55
60
To ensure a standardized format and help with autogenerating release notes, this repo uses commitlint, specifically the conventional config [commitlint/config-conventional](https://github.com/conventional-changelog/commitlint), please follow the conventional format for writing commit messages.
56
61
57
-
We have very precise rules over how our git commit messages can be formatted. This leads to **more
58
-
readable messages** that are easy to follow when looking through the **project commit history**. But also,
62
+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
63
+
readable messages** that are easy to follow when looking through the **project commit history**. But also,
59
64
we use the git commit messages to **generate the Cannon change log**.
60
65
61
66
### Commit Message Format
62
67
63
-
We use the [ConventionalCommits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format. Make sure to check their docs out for an in-depth look
68
+
We use the [ConventionalCommits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format. Make sure to check their docs out for an in-depth look
64
69
at the different rules and how they affect our commit format.
65
70
66
-
Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header has a special
71
+
Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header has a special
67
72
format that includes a **type**, an optional **scope** and a **subject**:
68
73
69
74
```
@@ -81,18 +86,20 @@ to read on GitHub as well as in various git tools.
81
86
82
87
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
83
88
84
-
Samples:
89
+
Samples:
85
90
86
91
```
87
92
docs(changelog): update changelog
88
93
```
94
+
89
95
```
90
96
fix(release): need to depend on latest hardhat
91
97
92
98
The version in our package.json gets copied to the one we publish, and users need the latest of these dependencies.
93
99
```
94
100
95
101
### Type
102
+
96
103
The most important prefixes you should have in mind are:
97
104
98
105
**fix**: which represents bug fixes, and correlates to a SemVer patch.
@@ -102,27 +109,31 @@ The most important prefixes you should have in mind are:
102
109
Must match one of the [conventional commit types](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum).
103
110
104
111
### Scope
105
-
The scope should be the name of the package affected by the commit.
112
+
113
+
The scope should be the name of the package affected by the commit.
106
114
`The list of supported scopes matches the list of packages under the packages/ directory
107
115
108
116
For extra reference, the following is a list of supported scopes:
109
117
110
-
***builder**
111
-
***cli**
112
-
***hardhat-cannon**
118
+
-**builder**
119
+
-**cli**
120
+
-**hardhat-cannon**
113
121
114
122
### Subject
123
+
115
124
The subject contains a succinct description of the change:
116
125
117
-
* use the imperative, present tense: "change" not "changed" nor "changes"
118
-
* don't capitalize the first letter
119
-
* no dot (.) at the end
126
+
- use the imperative, present tense: "change" not "changed" nor "changes"
127
+
- don't capitalize the first letter
128
+
- no dot (.) at the end
120
129
121
130
### Body (Optional)
131
+
122
132
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
123
133
The body should include the motivation for the change and contrast this with previous behavior.
124
134
125
135
### Footer (Optional)
136
+
126
137
The footer should contain any information about **Breaking Changes** and is also the place to
127
138
reference GitHub issues that this commit **Closes**.
128
139
@@ -131,8 +142,8 @@ reference GitHub issues that this commit **Closes**.
131
142
A detailed explanation can be found in this [document](#commit).
132
143
133
144
### Revert
134
-
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
135
145
146
+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
136
147
137
148
## <aname="submit"></a> Submission Guidelines
138
149
@@ -152,43 +163,48 @@ Depending on the issue, we will be insisting on a minimal reproduce scenario in
152
163
153
164
Unfortunately, in many cases we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
154
165
155
-
156
166
### <aname="submit-pr"></a> Submitting a Pull Request (PR)
167
+
157
168
Before you submit your Pull Request (PR) consider the following guidelines:
158
169
159
170
1. Search [GitHub](https://github.com/usecannon/cannon/pulls) for an open or closed PR
160
-
that relates to your submission. You don't want to duplicate effort.
171
+
that relates to your submission. You don't want to duplicate effort.
161
172
1. Fork the usecannon/cannon repo.
162
173
1. Make your changes in a new git branch:
163
174
164
-
```shell
165
-
git checkout -b my-fix-branch main
166
-
```
175
+
```shell
176
+
git checkout -b my-fix-branch main
177
+
```
167
178
168
179
1. Create your patch, **including appropriate test cases**.
169
180
1. Follow our [Coding Rules](#rules).
170
-
1. Run the full cannon test suite:
171
-
- From the root of the repo run `npm run test-all`, and ensure that all tests pass.
181
+
1. Run the full cannon test suite:
182
+
183
+
- From the root of the repo run `npm run test-all`, and ensure that all tests pass.
184
+
172
185
1. Commit your changes using a descriptive commit message that follows our
173
-
[commit message conventions](#commit). Adherence to these conventions
174
-
is necessary because release notes are automatically generated from these messages.
186
+
[commit message conventions](#commit). Adherence to these conventions
187
+
is necessary because release notes are automatically generated from these messages.
188
+
189
+
```shell
190
+
git commit -a
191
+
```
175
192
176
-
```shell
177
-
git commit -a
178
-
```
179
-
Note: the optional commit `-a`command line option will automatically "add" and "rm" edited files.
193
+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
180
194
181
195
1. Push your branch to GitHub:
182
196
183
-
```shell
184
-
git push origin my-fix-branch
185
-
```
197
+
```shell
198
+
git push origin my-fix-branch
199
+
```
186
200
187
201
1. In GitHub, send a pull request to `cannon:main`.
188
-
* If we suggest changes then:
189
-
* Make the required updates.
190
-
* Re-run the Cannon test suites to ensure tests are still passing.
191
-
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
202
+
203
+
- If we suggest changes then:
204
+
205
+
- Make the required updates.
206
+
- Re-run the Cannon test suites to ensure tests are still passing.
207
+
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
192
208
193
209
```shell
194
210
git rebase main -i
@@ -202,20 +218,20 @@ That's it! Thank you for your contribution!
202
218
After your pull request is merged, you can safely delete your branch and pull the changes
203
219
from the main (upstream) repository:
204
220
205
-
* Check out the main branch:
221
+
- Check out the main branch:
206
222
207
-
```shell
208
-
git checkout main -f
209
-
```
223
+
```shell
224
+
git checkout main -f
225
+
```
210
226
211
-
* Delete the local branch:
227
+
- Delete the local branch:
212
228
213
-
```shell
214
-
git branch -D my-fix-branch
215
-
```
229
+
```shell
230
+
git branch -D my-fix-branch
231
+
```
216
232
217
-
* Update your main with the latest upstream version:
233
+
- Update your main with the latest upstream version:
0 commit comments