Skip to content

Commit 3afc0d4

Browse files
authored
Merge pull request #778 from actions/jonjanego-contribution-updates
Updates to the contribution guidelines
2 parents f6e67d2 + bc8dee9 commit 3afc0d4

File tree

2 files changed

+57
-39
lines changed

2 files changed

+57
-39
lines changed

CONTRIBUTING.md

Lines changed: 56 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,52 @@
44
[pr]: https://github.com/actions/dependency-review-action/compare
55
[code-of-conduct]: CODE_OF_CONDUCT.md
66

7-
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
7+
Hi there! We're thrilled that you'd like to contribute to this project.
88

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).
9+
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
1210

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.
11+
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
1612

17-
### How it works
13+
## Bug reports and other issues
1814

19-
This Action makes an authenticated query to the Dependency Graph Diff
20-
API endpoint (`GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}`)
21-
to find out the set of added and removed dependencies for each manifest.
15+
If you've encountered a problem, please let us know by [submitting an issue](https://github.com/actions/dependency-review-action/issues/new)!
2216

23-
### Bootstrapping the project
17+
## Enhancements and feature requests
2418

25-
```
26-
git clone https://github.com/actions/dependency-review-action.git
27-
cd dependency-review-action
28-
npm install
29-
```
19+
If you've got an idea for a new feature, please submit as [an issue](https://github.com/actions/dependency-review-action/issues/new) so that the community can see it, and we can discuss it there. We may not be able to respond to every single issue, but will make a best effort!
3020

31-
### Running the tests
21+
If you'd like to make a contribution yourself, we ask that before significant effort is put into code changes, that we have agreement that the change aligns with our strategy for the action. Since this is a verified Action owned by GitHub we want to make sure that contributions are high quality, and that they maintain consistency with the rest of the action's behavior.
3222

33-
```
34-
npm run test
35-
```
23+
1. Create an [issue discussing the idea](https://github.com/actions/dependency-review-action/issues/new), so that we can discuss it there.
24+
2. If we agree to incorporate the idea into the action, please write-up a high level summary of the approach that you plan to take so we can review
25+
26+
## Stalebot
27+
28+
We have begun using a [Stalebot action](https://github.com/actions/stale) to help keep the Issues and Pull requests backlogs tidy. You can see the configuration [here](.github/workflows/stalebot.yml). If you'd like to keep an issue open after getting a stalebot warning, simply comment on it and it'll reset the clock.
29+
30+
## Development lifecycle
31+
32+
Ready to contribute to `dependency-review-action`? Here is some information to help you get started.
33+
34+
### High level overview of the action
35+
36+
This action makes an authenticated query to the [Dependency Review API](https://docs.github.com/en/rest/dependency-graph/dependency-review) endpoint (`GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}`) to find out the set of added and removed dependencies for each manifest.
37+
38+
The action then evaluates the differences between the pushes based on the the rules defined in the action configuration, and summarizes the differences and any violations of the rules you have defined as a comment in the pull request that triggered it and the action outputs.
39+
40+
### Local Development
3641

37-
_Note_: We don't have any useful tests yet, contributions are welcome!
42+
Before you begin, you need to have [Node.js](https://nodejs.org/en/) installed, minimum version 18.
3843

39-
## Local Development
44+
#### Bootstrapping the project
45+
46+
0. [Fork][fork] and clone the repository
47+
1. Change to the working directory: `cd dependency-review-action`
48+
2. Install the dependencies: `npm install`
49+
3. Make sure the tests pass on your machine: `npm run test`
50+
51+
#### Manually testing for vulnerabilities
4052

41-
It is recommended to have atleast [Node 18](https://nodejs.org/en/) installed.
4253
We have a script to scan a given PR for vulnerabilities, this will
4354
help you test your local changes. Make sure to [grab a Personal Access Token (PAT)](https://github.com/settings/tokens) before proceeding (you'll need `repo` permissions for private repos):
4455

@@ -53,7 +64,7 @@ $ GITHUB_TOKEN=<token> ./scripts/scan_pr <pr_url>
5364
Like this:
5465

5566
```sh
56-
$ GITHUB_TOKEN=my-secret-token ./scripts/scan_pr https://github.com/actions/dependency-review-action/pull/3
67+
$ GITHUB_TOKEN=<token> ./scripts/scan_pr https://github.com/actions/dependency-review-action/pull/3
5768
```
5869

5970
[Configuration options](README.md#configuration-options) can be set by
@@ -64,16 +75,20 @@ passing an external YAML [configuration file](README.md#configuration-file) to t
6475
$ GITHUB_TOKEN=<token> ./scripts/scan_pr --config-file my_custom_config.yml <pr_url>
6576
```
6677

67-
## Submitting a pull request
78+
#### Running unit tests
6879

69-
0. [Fork][fork] and clone the repository
70-
1. Configure and install the dependencies: `npm install`
71-
2. Make sure the tests pass on your machine: `npm run test`
72-
3. Create a new branch: `git checkout -b my-branch-name`
73-
4. Make your change, add tests, and make sure the tests still pass
74-
5. Make sure to build and package before pushing: `npm run build && npm run package`
75-
6. Push to your fork and [submit a pull request][pr]
76-
7. Pat your self on the back and wait for your pull request to be reviewed and merged.
80+
```
81+
npm run test
82+
```
83+
84+
_Note_: We don't a very comprehensive test suite, so any contributions to the existing tests are welcome!
85+
86+
### Submitting a pull request
87+
88+
1. Create a new branch: `git checkout -b my-branch-name`
89+
2. Make your change, add tests, and make sure the tests still pass
90+
3. Make sure to build and package before pushing: `npm run build && npm run package`
91+
4. Push to your fork and [submit a pull request][pr]
7792

7893
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
7994

@@ -82,9 +97,14 @@ Here are a few things you can do that will increase the likelihood of your pull
8297
- Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
8398
- Add examples of the usage to [examples.md](docs/examples.md)
8499
- Link to a sample PR in a custom repository running your version of the Action.
100+
- Please be responsive to any questions and feedback that you get from a maintainer of the repo!
85101

86102
## Cutting a new release
87103

104+
<details>
105+
106+
_Note: these instructions are for maintainers_
107+
88108
1. Update the version number in [package.json](https://github.com/actions/dependency-review-action/blob/main/package.json) and run `npm i` to update the lockfile.
89109
1. Go to [Draft a new
90110
release](https://github.com/actions/dependency-review-action/releases/new)
@@ -117,13 +137,11 @@ To do this just checkout `main`, force-create a new annotated tag, and push it:
117137
git tag -fa v4 -m "Updating v4 to 4.0.1"
118138
git push origin v4 --force
119139
```
140+
</details>
120141

121-
## Stalebot
122-
123-
We have begun using a [Stalebot action](https://github.com/actions/stale) to help keep the Issues and Pull requests backlogs tidy. You can see the configuration [here](.github/workflows/stalebot.yml). If you'd like to keep an issue open after getting a stalebot warning, simply comment on it and it'll reset the clock.
124142

125143
## Resources
126144

145+
- [Creating JavaScript GitHub actions](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action)
127146
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
128147
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
129-
- [GitHub Help](https://help.github.com)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
If you discover a security issue in this repo, please submit it through the [GitHub Security Bug Bounty](https://hackerone.com/github)
1+
If you discover a security issue in this repo, please submit it through the [GitHub Security Bug Bounty](https://bounty.github.com/)
22

33
Thanks for helping make GitHub Actions safe for everyone.

0 commit comments

Comments
 (0)