Skip to content

Commit 6272ff8

Browse files
author
Federico Builes
committed
Adding a guide for contributors.
1 parent 73ab788 commit 6272ff8

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

CONTRIBUTING.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Contributing
2+
3+
[fork]: https://github.com/github/dependency-submission-toolkit/fork
4+
[pr]: https://github.com/github/dependency-submission-toolkit/compare
5+
[code-of-conduct]: CODE_OF_CONDUCT.md
6+
7+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
8+
9+
Contributions to this project are
10+
[released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license)
11+
to the public under the [project's open source license](LICENSE).
12+
13+
Please note that this project is released with a [Contributor Code of
14+
Conduct][code-of-conduct]. By participating in this project you agree
15+
to abide by its terms.
16+
17+
### Bootstrapping the project
18+
19+
```
20+
git clone https://github.com/github/dependency-submission-toolkit.git
21+
cd dependency-submission-toolkit
22+
npm install
23+
```
24+
25+
### Running the tests
26+
27+
```
28+
npm run test
29+
```
30+
31+
## Submitting a pull request
32+
33+
0. [Fork][fork] and clone the repository
34+
1. Configure and install the dependencies: `npm install`
35+
2. Make sure the tests pass on your machine: `npm run test`
36+
3. Create a new branch: `git checkout -b my-branch-name`
37+
4. Make your change, add tests, and make sure the tests still pass
38+
5. Make sure to build and package before pushing: `npm run all`
39+
6. Push to your fork and [submit a pull request][pr]
40+
7. Pat your self on the back and wait for your pull request to be reviewed and merged.
41+
42+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
43+
44+
- Write tests.
45+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
46+
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
47+
48+
## Cutting a new release
49+
50+
1. Update the version number in [package.json](https://github.com/github/dependency-submission-toolkit/blob/main/package.json).
51+
1. Go to [Draft a new
52+
release](https://github.com/github/dependency-submission-toolkit/releases/new)
53+
in the Releases page.
54+
1. Make sure that the `Publish this Action to the GitHub Marketplace`
55+
checkbox is enabled
56+
3. Click "Choose a tag" and then "Create new tag", where the tag name
57+
will be your version prefixed by a `v` (e.g. `v1.2.3`).
58+
4. Use a version number for the release title (e.g. "v1.2.3").
59+
5. Add your release notes. If this is a major version make sure to
60+
include a small description of the biggest changes in the new version.
61+
6. Click "Publish Release".
62+
63+
You now have a tag and release using the semver version you used
64+
above. The last remaining thing to do is to move the dynamic version
65+
identifier to match the current SHA. This allows users to adopt a
66+
major version number (e.g. `v1`) in their workflows while
67+
automatically getting all the
68+
minor/patch updates.
69+
70+
To do this just checkout `main`, force-create a new annotated tag, and push it:
71+
72+
```
73+
git tag -fa v2 -m "Updating v2 to 2.3.4"
74+
git push origin v2 --force
75+
```
76+
77+
## Resources
78+
79+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
80+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
81+
- [GitHub Help](https://help.github.com)

0 commit comments

Comments
 (0)