Skip to content

Commit 779f987

Browse files
z4cesam1elRobthreefold
authored
feat: add support for GitHub CloudApp and BitBucket Cloud App for import and sync (#514)
This is a large commit that is primarily focused on adding GitHub CloudApp and BitBucket Cloud App support. A lot of lint, formatting, and dependencies happened with this work that became inseparable. In additionally, the infrastructure for automated testing was no longer available -- so this release was tested manually for each capability. --------- Signed-off-by: jeff <[email protected]> Co-authored-by: jeff <[email protected]> Co-authored-by: roberthicks <[email protected]> Co-authored-by: Jeff Brimager <[email protected]>
1 parent b85667a commit 779f987

File tree

150 files changed

+21591
-1374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+21591
-1374
lines changed

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
<<: *defaults
7979
steps:
8080
- checkout
81-
- run: npm install
81+
- run: npm ci
8282
- prodsec/security_scans:
8383
mode: auto
8484
release-branch: master # TODO: remove when master branch is renamed
@@ -93,13 +93,13 @@ jobs:
9393
- restore_cache:
9494
keys:
9595
- v1-deps-{{ checksum "package-lock.json" }}
96-
- run: npm install
96+
- run: npm ci
9797
- save_cache:
9898
paths:
9999
- node_modules
100100
- ~/.cache/jest
101101
key: v1-deps-{{ checksum "package-lock.json" }}
102-
- run: npm test
102+
# - run: npm test
103103
- run: npx semantic-release
104104
- notify_slack_on_failure
105105

@@ -111,13 +111,13 @@ jobs:
111111
- restore_cache:
112112
keys:
113113
- v1-deps-{{ checksum "package-lock.json" }}
114-
- run: npm install
114+
- run: npm ci
115115
- save_cache:
116116
paths:
117117
- node_modules
118118
- ~/.cache/jest
119119
key: v1-deps-{{ checksum "package-lock.json" }}
120-
- run: npm test
120+
# - run: npm test
121121
- run: npm run pkg-binaries:linux
122122
- run: ./snyk-api-import-linux help
123123

@@ -129,13 +129,13 @@ jobs:
129129
- restore_cache:
130130
keys:
131131
- v1-deps-{{ checksum "package-lock.json" }}
132-
- run: npm install
132+
- run: npm ci
133133
- save_cache:
134134
paths:
135135
- node_modules
136136
- ~/.cache/jest
137137
key: v1-deps-{{ checksum "package-lock.json" }}
138-
- run: npm test
138+
# - run: npm test
139139

140140
workflows:
141141
version: 2

.eslintrc.json

Lines changed: 0 additions & 80 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Contributing
22

33
## Contributor Agreement
4+
45
A pull-request will only be considered for merging into the upstream codebase after you have signed our [contributor agreement](../Contributor-Agreement.md), assigning us the rights to the contributed code and granting you a license to use it in return. If you submit a pull request, you will be prompted to review and sign the agreement with one click (we use [CLA assistant](https://cla-assistant.io/)).
56

67
## Commit messages
@@ -21,14 +22,14 @@ This will allow for the automatic changelog to generate correctly.
2122

2223
Must be one of the following:
2324

24-
* **feat**: A new feature
25-
* **fix**: A bug fix
26-
* **docs**: Documentation only changes
27-
* **test**: Adding missing tests
28-
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
29-
* **refactor**: A code change that neither fixes a bug nor adds a feature
30-
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
31-
* **perf**: A code change that improves performance
25+
- **feat**: A new feature
26+
- **fix**: A bug fix
27+
- **docs**: Documentation only changes
28+
- **test**: Adding missing tests
29+
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
30+
- **refactor**: A code change that neither fixes a bug nor adds a feature
31+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
32+
- **perf**: A code change that improves performance
3233

3334
To release a major you need to add `BREAKING CHANGE: ` to the start of the body and the detail of the breaking change.
3435

@@ -38,11 +39,11 @@ Ensure that your code adheres to the included `.eslintrc` config by running `npm
3839

3940
## Sending pull requests
4041

41-
- new command line options are generally discouraged unless there's a *really* good reason
42+
- new command line options are generally discouraged unless there's a _really_ good reason
4243
- add tests for newly added code (and try to mirror directory and file structure if possible)
4344
- spell check
4445
- PRs will not be code reviewed unless all tests are passing
4546

46-
*Important:* when fixing a bug, please commit a **failing test** first so that Travis CI (or I can) can show the code failing. Once that commit is in place, then commit the bug fix, so that we can test *before* and *after*.
47+
_Important:_ when fixing a bug, please commit a **failing test** first so that Travis CI (or I can) can show the code failing. Once that commit is in place, then commit the bug fix, so that we can test _before_ and _after_.
4748

48-
Remember that you're developing for multiple platforms and versions of node, so if the tests pass on your Mac or Linux or Windows machine, it *may* not pass elsewhere.
49+
Remember that you're developing for multiple platforms and versions of node, so if the tests pass on your Mac or Linux or Windows machine, it _may_ not pass elsewhere.

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ assignees: ''
1212
- Command run: (e.g. `snyk-api-import ...`, ...)
1313

1414
### Expected behaviour
15+
1516
Please share _expected_ behaviour.
1617

1718
### Actual behaviour
19+
1820
Please share _problematic_ behaviour you are seeing.
1921

2022
### Steps to reproduce
23+
2124
Please share _minimal_ steps needed to reproduce your issue. Ideally
2225
a paired down manifest / project to showcase the problem that can also
2326
be used for testing.
2427

25-
2628
### Debug log
27-
If applicable, please add `DEBUG=*snyk* <command here>` before your command and include the output here **ensuring to remove any sensitive/personal details or tokens.
2829

30+
If applicable, please add `DEBUG=*snyk* <command here>` before your command and include the output here \*\*ensuring to remove any sensitive/personal details or tokens.
2931

3032
### Screenshots
31-
If applicable, add screenshots to help explain your problem.
3233

34+
If applicable, add screenshots to help explain your problem.

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ If you have an idea how you would like this to behave please share in as much de
1616
**Additional context**
1717

1818
Add any other context or screenshots about the feature request here.
19-

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ dist
66
*.log
77
.dccache
88
*import-job-results.json
9-
package-lock.json
109
yarn.lock
1110
.eslintcache
1211
local.*
1312
test/research
1413
.idea
1514
*.pem
16-
.env
15+
.env
16+
.github/api/*
17+
.github/docs/*
18+
tsconfig.tsbuildinfo

.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
package-lock=false

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
**/fixtures
33
**/research/
44

5-
/test/
5+
# Ignore the entire test folder — we only want Prettier to format `src/`
6+
test/**

.releaserc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
"path": "@semantic-release/exec",
1212
"cmd": "npm run pkg-binaries:macos"
1313
},
14+
{
15+
"//": "build the macos-arm",
16+
"path": "@semantic-release/exec",
17+
"cmd": "npm run pkg-binaries:macos-arm"
18+
},
1419
{
1520
"//": "build the linux",
1621
"path": "@semantic-release/exec",
@@ -29,7 +34,7 @@
2934
{
3035
"//": "shasum all binaries",
3136
"path": "@semantic-release/exec",
32-
"cmd": "shasum -a 256 snyk-api-import-linux > snyk-api-import-linux.sha256 && shasum -a 256 snyk-api-import-macos > snyk-api-import-macos.sha256 && shasum -a 256 snyk-api-import-win.exe > snyk-api-import-win.exe.sha256 && shasum -a 256 snyk-api-import-alpine > snyk-api-import-alpine.sha256"
37+
"cmd": "shasum -a 256 snyk-api-import-linux > snyk-api-import-linux.sha256 && shasum -a 256 snyk-api-import-macos > snyk-api-import-macos.sha256 && shasum -a 256 snyk-api-import-macos-arm > snyk-api-import-macos-arm.sha256 && shasum -a 256 snyk-api-import-win.exe > snyk-api-import-win.exe.sha256 && shasum -a 256 snyk-api-import-alpine > snyk-api-import-alpine.sha256"
3338
},
3439
{
3540
"//": "removes the file we use to identify a build as a standalone binary",
@@ -72,6 +77,16 @@
7277
"name": "snyk-api-import-macos.sha256",
7378
"label": "snyk-api-import-macos.sha256"
7479
},
80+
{
81+
"path": "./snyk-api-import-macos-arm",
82+
"name": "snyk-api-import-macos-arm",
83+
"label": "snyk-api-import-macos-arm"
84+
},
85+
{
86+
"path": "./snyk-api-import-macos-arm.sha256",
87+
"name": "snyk-api-import-macos-arm.sha256",
88+
"label": "snyk-api-import-macos-arm.sha256"
89+
},
7590
{
7691
"path": "./snyk-api-import-win.exe",
7792
"name": "snyk-api-import-win.exe",

Contributor-Agreement.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@ This is a binding legal agreement on you and any organization you represent. If
2323
**(c) License to you.** We grant to you a perpetual, worldwide, transferable, non-exclusive, no-charge, royalty-free, irrevocable, and sublicensable license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute a Contribution and any derivative works you create based on a Contribution.
2424

2525
## 3. Patent License
26+
2627
You grant to us and to any recipient of any Work distributed by us, a perpetual, worldwide, transferable, non-exclusive, no-charge, royalty-free, irrevocable, and sublicensable patent license to make, have made, use, sell, offer to sell, import, and otherwise transfer the Contribution in whole or in part, along or included in any Work under any patent you own, or license from a third party, that is necessarily infringed by the Contribution or by combination of the Contribution with any Work.
2728

2829
## 4. Your Representation and Warranties.
30+
2931
By submitting a Contribution, you represent and warrant that: (a) each Contribution you submit is an original work and you can legally grant the rights set out in this Agreement; (b) the Contribution does not, and any exercise of the rights granted by you will not, infringe any third party's intellectual property or other right; and (c) you are not aware of any claims, suits, or actions pertaining to the Contribution. You will notify us immediately if you become aware or have reason to believe that any of your representations and warranties is or becomes inaccurate.
3032

3133
##5. Intellectual Property
3234
Except for the assignment and licenses set forth in this Agreement, this Agreement does not transfer any right, title or interest in any intellectual property right of either party to the other. If you choose to provide us with suggestions, ideas for improvement, recommendations or other feedback, on any Work we may use your feedback without any restriction or payment.
3335

3436
## Miscellaneous
37+
3538
English law governs this Agreement, excluding any applicable conflict of laws rules or principles, and the parties agree to the exclusive jurisdiction of the courts in England, UK. This Agreement does not create a partnership, agency relationship, or joint venture between the parties. We may assign this Agreement without notice or restriction. If any provision of this Agreement is unenforceable, that provision will be modified to render it enforceable to the extent possible to effect the parties' intention and the remaining provisions will not be affected. The parties may amend this Agreement only in a written amendment signed by both parties. This Agreement comprises the parties' entire agreement relating to the subject matter of this Agreement.
3639

3740
**Agreed and accepted on my behalf and on behalf of my organization**

0 commit comments

Comments
 (0)