danger 10.9.0 → 11.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.eslintrc.js +66 -0
- package/.release-it.json +1 -0
- package/CHANGELOG.md +100 -31
- package/Dockerfile +1 -1
- package/README.md +1 -1
- package/SECURITY.md +9 -0
- package/distribution/api/fetch.d.ts +1 -1
- package/distribution/api/fetch.js +18 -18
- package/distribution/api/fetch.js.map +1 -1
- package/distribution/ci_source/ci_source_helpers.js +3 -3
- package/distribution/ci_source/ci_source_helpers.js.map +1 -1
- package/distribution/ci_source/get_ci_source.js +14 -11
- package/distribution/ci_source/get_ci_source.js.map +1 -1
- package/distribution/ci_source/providers/AppCenter.js +6 -6
- package/distribution/ci_source/providers/AppCenter.js.map +1 -1
- package/distribution/ci_source/providers/Bamboo.js +4 -4
- package/distribution/ci_source/providers/Bamboo.js.map +1 -1
- package/distribution/ci_source/providers/BitbucketPipelines.js +3 -3
- package/distribution/ci_source/providers/BitbucketPipelines.js.map +1 -1
- package/distribution/ci_source/providers/Bitrise.js +3 -3
- package/distribution/ci_source/providers/Bitrise.js.map +1 -1
- package/distribution/ci_source/providers/BuddyBuild.js +2 -2
- package/distribution/ci_source/providers/BuddyBuild.js.map +1 -1
- package/distribution/ci_source/providers/BuddyWorks.js +2 -2
- package/distribution/ci_source/providers/BuddyWorks.js.map +1 -1
- package/distribution/ci_source/providers/Buildkite.js +2 -2
- package/distribution/ci_source/providers/Buildkite.js.map +1 -1
- package/distribution/ci_source/providers/Circle.js +4 -4
- package/distribution/ci_source/providers/Circle.js.map +1 -1
- package/distribution/ci_source/providers/Cirrus.js +3 -3
- package/distribution/ci_source/providers/Cirrus.js.map +1 -1
- package/distribution/ci_source/providers/CodeBuild.js +3 -3
- package/distribution/ci_source/providers/CodeBuild.js.map +1 -1
- package/distribution/ci_source/providers/Codefresh.js +4 -4
- package/distribution/ci_source/providers/Codefresh.js.map +1 -1
- package/distribution/ci_source/providers/Codemagic.js +4 -4
- package/distribution/ci_source/providers/Codemagic.js.map +1 -1
- package/distribution/ci_source/providers/Codeship.js +3 -3
- package/distribution/ci_source/providers/Codeship.js.map +1 -1
- package/distribution/ci_source/providers/Concourse.js +2 -2
- package/distribution/ci_source/providers/Concourse.js.map +1 -1
- package/distribution/ci_source/providers/DockerCloud.js +4 -4
- package/distribution/ci_source/providers/DockerCloud.js.map +1 -1
- package/distribution/ci_source/providers/Drone.js +2 -2
- package/distribution/ci_source/providers/Drone.js.map +1 -1
- package/distribution/ci_source/providers/Fake.js +4 -4
- package/distribution/ci_source/providers/Fake.js.map +1 -1
- package/distribution/ci_source/providers/GitHubActions.js +3 -3
- package/distribution/ci_source/providers/GitHubActions.js.map +1 -1
- package/distribution/ci_source/providers/GitLabCI.js +2 -2
- package/distribution/ci_source/providers/GitLabCI.js.map +1 -1
- package/distribution/ci_source/providers/Jenkins.js +6 -6
- package/distribution/ci_source/providers/Jenkins.js.map +1 -1
- package/distribution/ci_source/providers/Netlify.js +2 -2
- package/distribution/ci_source/providers/Netlify.js.map +1 -1
- package/distribution/ci_source/providers/Nevercode.js +3 -3
- package/distribution/ci_source/providers/Nevercode.js.map +1 -1
- package/distribution/ci_source/providers/Screwdriver.js +2 -2
- package/distribution/ci_source/providers/Screwdriver.js.map +1 -1
- package/distribution/ci_source/providers/Semaphore.js +2 -2
- package/distribution/ci_source/providers/Semaphore.js.map +1 -1
- package/distribution/ci_source/providers/Surf.js +2 -2
- package/distribution/ci_source/providers/Surf.js.map +1 -1
- package/distribution/ci_source/providers/TeamCity.js +5 -5
- package/distribution/ci_source/providers/TeamCity.js.map +1 -1
- package/distribution/ci_source/providers/Travis.js +3 -3
- package/distribution/ci_source/providers/Travis.js.map +1 -1
- package/distribution/ci_source/providers/VSTS.js +2 -2
- package/distribution/ci_source/providers/VSTS.js.map +1 -1
- package/distribution/ci_source/providers/XcodeCloud.js +2 -2
- package/distribution/ci_source/providers/XcodeCloud.js.map +1 -1
- package/distribution/commands/ci/resetStatus.js +7 -6
- package/distribution/commands/ci/resetStatus.js.map +1 -1
- package/distribution/commands/ci/runner.js +13 -12
- package/distribution/commands/ci/runner.js.map +1 -1
- package/distribution/commands/danger-ci.js +2 -2
- package/distribution/commands/danger-ci.js.map +1 -1
- package/distribution/commands/danger-init.js +19 -19
- package/distribution/commands/danger-init.js.map +1 -1
- package/distribution/commands/danger-local.js +5 -5
- package/distribution/commands/danger-local.js.map +1 -1
- package/distribution/commands/danger-pr.js +12 -12
- package/distribution/commands/danger-pr.js.map +1 -1
- package/distribution/commands/danger-process.js +10 -10
- package/distribution/commands/danger-process.js.map +1 -1
- package/distribution/commands/danger-reset-status.js +2 -2
- package/distribution/commands/danger-reset-status.js.map +1 -1
- package/distribution/commands/danger-runner.js +15 -17
- package/distribution/commands/danger-runner.js.map +1 -1
- package/distribution/commands/init/add-to-ci.js +16 -13
- package/distribution/commands/init/add-to-ci.js.map +1 -1
- package/distribution/commands/init/default-dangerfile.js +13 -9
- package/distribution/commands/init/default-dangerfile.js.map +1 -1
- package/distribution/commands/init/get-repo-slug.js +3 -2
- package/distribution/commands/init/get-repo-slug.js.map +1 -1
- package/distribution/commands/init/interfaces.d.ts +3 -3
- package/distribution/commands/init/state-setup.js +9 -7
- package/distribution/commands/init/state-setup.js.map +1 -1
- package/distribution/commands/utils/chainsmoker.js +2 -2
- package/distribution/commands/utils/chainsmoker.js.map +1 -1
- package/distribution/commands/utils/dangerRunToRunnerCLI.js +1 -1
- package/distribution/commands/utils/dangerRunToRunnerCLI.js.map +1 -1
- package/distribution/commands/utils/fileUtils.js +5 -5
- package/distribution/commands/utils/fileUtils.js.map +1 -1
- package/distribution/commands/utils/getRuntimeCISource.js +2 -2
- package/distribution/commands/utils/getRuntimeCISource.js.map +1 -1
- package/distribution/commands/utils/reporting.js +18 -13
- package/distribution/commands/utils/reporting.js.map +1 -1
- package/distribution/commands/utils/runDangerSubprocess.d.ts +1 -0
- package/distribution/commands/utils/runDangerSubprocess.js +26 -20
- package/distribution/commands/utils/runDangerSubprocess.js.map +1 -1
- package/distribution/commands/utils/validateDangerfileExists.js +3 -3
- package/distribution/commands/utils/validateDangerfileExists.js.map +1 -1
- package/distribution/danger.d.ts +9 -3
- package/distribution/danger.js.flow +1 -1
- package/distribution/debug.js +3 -2
- package/distribution/debug.js.map +1 -1
- package/distribution/dsl/DangerResults.js +27 -22
- package/distribution/dsl/DangerResults.js.map +1 -1
- package/distribution/dsl/Violation.js +2 -1
- package/distribution/dsl/Violation.js.map +1 -1
- package/distribution/platforms/BitBucketCloud.js +2 -2
- package/distribution/platforms/BitBucketCloud.js.map +1 -1
- package/distribution/platforms/BitBucketServer.js +5 -4
- package/distribution/platforms/BitBucketServer.js.map +1 -1
- package/distribution/platforms/FakePlatform.js +2 -2
- package/distribution/platforms/FakePlatform.js.map +1 -1
- package/distribution/platforms/GitHub.js +17 -16
- package/distribution/platforms/GitHub.js.map +1 -1
- package/distribution/platforms/GitLab.js +7 -6
- package/distribution/platforms/GitLab.js.map +1 -1
- package/distribution/platforms/LocalGit.js +5 -5
- package/distribution/platforms/LocalGit.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js +26 -26
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudGit.js +5 -4
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudGit.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js +6 -6
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js +37 -28
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js.map +1 -1
- package/distribution/platforms/bitbucket_server/BitBucketServerAPI.js +22 -22
- package/distribution/platforms/bitbucket_server/BitBucketServerAPI.js.map +1 -1
- package/distribution/platforms/bitbucket_server/BitBucketServerGit.js +20 -17
- package/distribution/platforms/bitbucket_server/BitBucketServerGit.js.map +1 -1
- package/distribution/platforms/git/diffToGitJSONDSL.js +4 -3
- package/distribution/platforms/git/diffToGitJSONDSL.js.map +1 -1
- package/distribution/platforms/git/gitJSONToGitDSL.js +17 -15
- package/distribution/platforms/git/gitJSONToGitDSL.js.map +1 -1
- package/distribution/platforms/git/localGetCommits.js +4 -3
- package/distribution/platforms/git/localGetCommits.js.map +1 -1
- package/distribution/platforms/git/localGetDiff.js +6 -5
- package/distribution/platforms/git/localGetDiff.js.map +1 -1
- package/distribution/platforms/git/localGetFileAtSHA.js +6 -5
- package/distribution/platforms/git/localGetFileAtSHA.js.map +1 -1
- package/distribution/platforms/git/localLogGitCommits.d.ts +1 -1
- package/distribution/platforms/git/localLogGitCommits.js +4 -3
- package/distribution/platforms/git/localLogGitCommits.js.map +1 -1
- package/distribution/platforms/github/GitHubAPI.js +39 -39
- package/distribution/platforms/github/GitHubAPI.js.map +1 -1
- package/distribution/platforms/github/GitHubGit.js +7 -5
- package/distribution/platforms/github/GitHubGit.js.map +1 -1
- package/distribution/platforms/github/GitHubUtils.d.ts +1108 -1
- package/distribution/platforms/github/GitHubUtils.js +47 -28
- package/distribution/platforms/github/GitHubUtils.js.map +1 -1
- package/distribution/platforms/github/comms/checks/githubAppSupport.js +8 -7
- package/distribution/platforms/github/comms/checks/githubAppSupport.js.map +1 -1
- package/distribution/platforms/github/comms/checks/resultsToCheck.js +20 -18
- package/distribution/platforms/github/comms/checks/resultsToCheck.js.map +1 -1
- package/distribution/platforms/github/comms/checksCommenter.js +20 -16
- package/distribution/platforms/github/comms/checksCommenter.js.map +1 -1
- package/distribution/platforms/github/comms/issueCommenter.js +11 -9
- package/distribution/platforms/github/comms/issueCommenter.js.map +1 -1
- package/distribution/platforms/github/customGitHubRequire.js +33 -28
- package/distribution/platforms/github/customGitHubRequire.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.d.ts +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.js +10 -10
- package/distribution/platforms/gitlab/GitLabAPI.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabGit.js +9 -7
- package/distribution/platforms/gitlab/GitLabGit.js.map +1 -1
- package/distribution/platforms/platform.js +6 -6
- package/distribution/platforms/platform.js.map +1 -1
- package/distribution/platforms/pullRequestParser.js +4 -4
- package/distribution/platforms/pullRequestParser.js.map +1 -1
- package/distribution/runner/DangerUtils.js +3 -2
- package/distribution/runner/DangerUtils.js.map +1 -1
- package/distribution/runner/Executor.js +49 -43
- package/distribution/runner/Executor.js.map +1 -1
- package/distribution/runner/dangerDSLJSON.js.map +1 -1
- package/distribution/runner/dslGenerator.js +3 -2
- package/distribution/runner/dslGenerator.js.map +1 -1
- package/distribution/runner/jsonToContext.js +2 -2
- package/distribution/runner/jsonToContext.js.map +1 -1
- package/distribution/runner/jsonToDSL.js +16 -15
- package/distribution/runner/jsonToDSL.js.map +1 -1
- package/distribution/runner/runners/inline.js +10 -9
- package/distribution/runner/runners/inline.js.map +1 -1
- package/distribution/runner/runners/utils/resultsForCaughtError.js +3 -3
- package/distribution/runner/runners/utils/resultsForCaughtError.js.map +1 -1
- package/distribution/runner/runners/utils/transpiler.js +36 -29
- package/distribution/runner/runners/utils/transpiler.js.map +1 -1
- package/distribution/runner/templates/bitbucketCloudTemplate.js +18 -14
- package/distribution/runner/templates/bitbucketCloudTemplate.js.map +1 -1
- package/distribution/runner/templates/bitbucketServerTemplate.js +17 -13
- package/distribution/runner/templates/bitbucketServerTemplate.js.map +1 -1
- package/distribution/runner/templates/exceptionRaisedTemplate.js +1 -1
- package/distribution/runner/templates/exceptionRaisedTemplate.js.map +1 -1
- package/distribution/runner/templates/githubIssueTemplate.js +23 -19
- package/distribution/runner/templates/githubIssueTemplate.js.map +1 -1
- package/distribution/runner/templates/markdownTableTemplate.js +3 -3
- package/distribution/runner/templates/markdownTableTemplate.js.map +1 -1
- package/package.json +35 -28
- package/tsconfig.spec.json +4 -0
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es6: true,
|
|
5
|
+
node: true,
|
|
6
|
+
},
|
|
7
|
+
extends: ["plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"],
|
|
8
|
+
parser: "@typescript-eslint/parser",
|
|
9
|
+
parserOptions: {
|
|
10
|
+
project: "tsconfig.spec.json",
|
|
11
|
+
sourceType: "module",
|
|
12
|
+
},
|
|
13
|
+
plugins: ["eslint-plugin-jest", "eslint-plugin-jsdoc", "@typescript-eslint"],
|
|
14
|
+
rules: {
|
|
15
|
+
"@typescript-eslint/naming-convention": "error",
|
|
16
|
+
"@typescript-eslint/no-empty-function": "error",
|
|
17
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
18
|
+
|
|
19
|
+
// Something is grumpy about these rules re: node imports - TODO
|
|
20
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
21
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
22
|
+
|
|
23
|
+
curly: "error",
|
|
24
|
+
"jsdoc/check-alignment": "error",
|
|
25
|
+
"jsdoc/check-indentation": "off",
|
|
26
|
+
"jsdoc/newline-after-description": "off",
|
|
27
|
+
"no-empty": "error",
|
|
28
|
+
// This is used intentionally in a bunch of ci_source/providers
|
|
29
|
+
"no-empty-function": "off",
|
|
30
|
+
"no-redeclare": "error",
|
|
31
|
+
"no-var": "error",
|
|
32
|
+
// There are a bunch of existing uses of 'let' where this rule would trigger
|
|
33
|
+
"prefer-const": "off",
|
|
34
|
+
|
|
35
|
+
// This project has a ton of interacting APIs, and sometimes it's helpful to be explicit, even if the type is trivial
|
|
36
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
37
|
+
|
|
38
|
+
"no-unused-expressions": "off",
|
|
39
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
40
|
+
|
|
41
|
+
"no-unused-vars": "off",
|
|
42
|
+
"@typescript-eslint/no-unused-vars": [
|
|
43
|
+
"warn",
|
|
44
|
+
{
|
|
45
|
+
// Allow function args to be unused
|
|
46
|
+
args: "none",
|
|
47
|
+
argsIgnorePattern: "^_",
|
|
48
|
+
varsIgnorePattern: "^_",
|
|
49
|
+
caughtErrorsIgnorePattern: "^_",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
|
|
53
|
+
"jest/no-disabled-tests": "warn",
|
|
54
|
+
"jest/no-focused-tests": "error",
|
|
55
|
+
"jest/no-identical-title": "error",
|
|
56
|
+
"jest/prefer-to-have-length": "off",
|
|
57
|
+
"jest/valid-expect": "error",
|
|
58
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
59
|
+
// Tons of violations in the codebase
|
|
60
|
+
"@typescript-eslint/naming-convention": "off",
|
|
61
|
+
// Used liberally in the codebase
|
|
62
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
63
|
+
// This has value in communicating with other Developers even if it has no functional effect.
|
|
64
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
65
|
+
},
|
|
66
|
+
}
|
package/.release-it.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
// These docs are aimed at users rather than danger developers, so please limit technical
|
|
7
7
|
// terminology in here.
|
|
8
8
|
|
|
9
|
-
// Note: if this is your first PR, you'll need to add your
|
|
10
|
-
// see the bottom of this file.
|
|
9
|
+
// Note: if this is your first PR, you'll need to add your link to your
|
|
10
|
+
// username handle to the footnotes. see the bottom of this file.
|
|
11
|
+
// The list there is sorted, try to follow that.
|
|
11
12
|
|
|
12
13
|
-->
|
|
13
14
|
|
|
@@ -15,9 +16,26 @@
|
|
|
15
16
|
|
|
16
17
|
<!-- Your comment below this -->
|
|
17
18
|
|
|
18
|
-
|
|
19
19
|
<!-- Your comment above this -->
|
|
20
20
|
|
|
21
|
+
# 11.0.4
|
|
22
|
+
|
|
23
|
+
- Deploying from my Mac to see if that's what's causing the build issues for homebrew. [@orta]
|
|
24
|
+
|
|
25
|
+
# 11.0.3
|
|
26
|
+
|
|
27
|
+
- Bump up @babel/* plugins for Core-JS support. [@parvez]
|
|
28
|
+
- Replace deprecated @Babel/polyfill dependency with Core-JS + Regenerator-Runtime. [@gpetrioli]
|
|
29
|
+
- *Fix:* / *Improvement* Don't drop inline comments which fall outside of the diff in GitHub PRs - [#1272](https://github.com/danger/danger-js/pull/1272) [@rouby]
|
|
30
|
+
|
|
31
|
+
- *Chore:* Switch from tslint to eslint (tslint is end-of-life) - [#1205](https://github.com/danger/danger-js/pull/1205) [@fbartho]
|
|
32
|
+
|
|
33
|
+
# 11.0.0 -> 11.0.2
|
|
34
|
+
|
|
35
|
+
- *Breaking:* Upgrade @octokit/rest from ^16.43.1 to ^18.12.0 - [#1204](https://github.com/danger/danger-js/pull/1204) [@fbartho]
|
|
36
|
+
|
|
37
|
+
This is only likely to hit you if you use `danger.github.api` pretty extensively in your Dangerfiles, but better to keep an eye out.
|
|
38
|
+
|
|
21
39
|
# 10.8.1
|
|
22
40
|
|
|
23
41
|
|
|
@@ -97,13 +115,13 @@
|
|
|
97
115
|
|
|
98
116
|
# 10.5.0
|
|
99
117
|
|
|
100
|
-
- Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet]
|
|
118
|
+
- Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet]
|
|
101
119
|
|
|
102
120
|
# 10.4.1
|
|
103
121
|
|
|
104
122
|
- Improved `tsconfig.json` file lookup strategy: it now looks for it starting from the location of the danger file.
|
|
105
|
-
#1068 [@igorbek]
|
|
106
|
-
- Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc]
|
|
123
|
+
#1068 [@igorbek]
|
|
124
|
+
- Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc]
|
|
107
125
|
|
|
108
126
|
# 10.4.0
|
|
109
127
|
|
|
@@ -116,7 +134,7 @@
|
|
|
116
134
|
DANGER_MANUAL_GH_REPO: ${{ steps.pr_info.outputs.repo }}
|
|
117
135
|
DANGER_MANUAL_PR: ${{ steps.pr_info.outputs.number }}
|
|
118
136
|
```
|
|
119
|
-
Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta]
|
|
137
|
+
Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta]
|
|
120
138
|
|
|
121
139
|
# 10.3.1
|
|
122
140
|
|
|
@@ -129,7 +147,7 @@
|
|
|
129
147
|
|
|
130
148
|
# 10.2.2
|
|
131
149
|
|
|
132
|
-
- Add support for `danger local` on repos without a master branch - [@ahobson]
|
|
150
|
+
- Add support for `danger local` on repos without a master branch - [@ahobson]
|
|
133
151
|
|
|
134
152
|
# 10.2.1
|
|
135
153
|
|
|
@@ -169,7 +187,7 @@
|
|
|
169
187
|
- Don't use hardcoded userId to update comments if using personal token in Github Actions - [@rohit-gohri]
|
|
170
188
|
- Disable warning in Github Action if using DANGER_GITHUB_API_TOKEN - [@rohit-gohri]
|
|
171
189
|
- Update `parse-diff` library - [@417-72KI]
|
|
172
|
-
- Fix repository slug in Jenkins provider - [sandratatarevicova]
|
|
190
|
+
- Fix repository slug in Jenkins provider - [@sandratatarevicova]
|
|
173
191
|
- Add Gitlab diff support - [@rohit-gohri]
|
|
174
192
|
- Fix Typos across danger-js Repo - [@yohix]
|
|
175
193
|
- Fix `@octokit/rest` deprecation warning when using `.issues.addLabels()` - [@sogame]
|
|
@@ -342,7 +360,7 @@
|
|
|
342
360
|
|
|
343
361
|
# 7.0.19
|
|
344
362
|
|
|
345
|
-
- Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta][@dblandin]
|
|
363
|
+
- Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta], [@dblandin]
|
|
346
364
|
|
|
347
365
|
# 7.0.18
|
|
348
366
|
|
|
@@ -723,7 +741,7 @@ Also, `danger pr` now accepts a `--process` arg.
|
|
|
723
741
|
|
|
724
742
|
# 3.7.17
|
|
725
743
|
|
|
726
|
-
- Improvements to PR detection on Team City - @markelog
|
|
744
|
+
- Improvements to PR detection on Team City - [@markelog]
|
|
727
745
|
|
|
728
746
|
# 3.7.16
|
|
729
747
|
|
|
@@ -1857,73 +1875,124 @@ That should do ya. I think. This doesn't support babel, and I haven't explored u
|
|
|
1857
1875
|
|
|
1858
1876
|
Not usable for others, only stubs of classes etc. - [@orta]
|
|
1859
1877
|
|
|
1860
|
-
[
|
|
1861
|
-
[
|
|
1878
|
+
[@417-72ki]: https://github.com/417-72KI
|
|
1879
|
+
[@HonzaMac]: https://github.com/HonzaMac
|
|
1880
|
+
[@JanStevens]: https://github.com/JanStevens
|
|
1881
|
+
[@RDIL]: https://github.com/RDIL
|
|
1882
|
+
[@Teamop]: https://github.com/Teamop
|
|
1883
|
+
[@adam-bratin]: https://github.com/adam-bratin
|
|
1862
1884
|
[@adam-moss]: https://github.com/adam-moss
|
|
1863
1885
|
[@adamnoakes]: https://github.com/adamnoakes
|
|
1864
1886
|
[@aghassi]: https://github.com/aghassi
|
|
1887
|
+
[@ahobson]: https://github.com/ahobson
|
|
1888
|
+
[@alexandermendes]: https://github.com/alexandermendes
|
|
1889
|
+
[@andykenward]: https://github.com/andykenward
|
|
1865
1890
|
[@ashfurrow]: https://github.com/ashfurrow
|
|
1891
|
+
[@awgeorge]: https://github.com/awgeorge
|
|
1866
1892
|
[@azz]: https://github.com/azz
|
|
1893
|
+
[@bdotdub]: https://github.com/bdotdub
|
|
1894
|
+
[@bigkraig]: https://github.com/bigkraig
|
|
1867
1895
|
[@caffodian]: https://github.com/caffodian
|
|
1868
1896
|
[@codestergit]: https://github.com/codestergit
|
|
1869
1897
|
[@cwright017]: https://github.com/Cwright017
|
|
1870
1898
|
[@cysp]: https://github.com/cysp
|
|
1871
1899
|
[@danielrosenwasser]: https://github.com/DanielRosenwasser
|
|
1872
1900
|
[@davidbrunow]: https://github.com/davidbrunow
|
|
1901
|
+
[@davidhouweling]: https://github.com/davidhouweling
|
|
1902
|
+
[@dbgrandi]: https://github.com/dbgrandi
|
|
1903
|
+
[@dblandin]: https://github.com/dblandin
|
|
1904
|
+
[@denieler]: https://github.com/denieler
|
|
1873
1905
|
[@dfalling]: https://github.com/dfalling
|
|
1874
1906
|
[@dkundel]: https://github.com/dkundel
|
|
1907
|
+
[@doniyor2109]: https://github.com/doniyor2109
|
|
1908
|
+
[@ds300]: https://github.com/ds300
|
|
1875
1909
|
[@f-meloni]: https://github.com/f-meloni
|
|
1876
1910
|
[@fbartho]: https://github.com/fbartho
|
|
1911
|
+
[@flovilmart]: https://github.com/flovilmart
|
|
1912
|
+
[@friederbluemle]: https://github.com/friederbluemle
|
|
1877
1913
|
[@fwal]: https://github.com/fwal
|
|
1914
|
+
[@g3offrey]: https://github.com/g3offrey
|
|
1915
|
+
[@gantman]: https://github.com/gantman
|
|
1916
|
+
[@gpetrioli]: https:/github.com/gpetrioli
|
|
1917
|
+
[@gzaripov]: https://github.com/gzaripov
|
|
1918
|
+
[@hanneskaeufler]: https://github.com/hanneskaeufler
|
|
1878
1919
|
[@happylinks]: https://github.com/happylinks
|
|
1920
|
+
[@hellocore]: https://github.com/HelloCore
|
|
1921
|
+
[@hiroppy]: https://github.com/hiroppy
|
|
1879
1922
|
[@hmcc]: https://github.com/hmcc
|
|
1923
|
+
[@hmschreiner]: https://github.com/hmschreiner
|
|
1880
1924
|
[@hongrich]: https://github.com/hongrich
|
|
1881
|
-
[@
|
|
1925
|
+
[@igorbek]: https://github.com/igorbek
|
|
1926
|
+
[@iljadaderko]: https://github.com/IljaDaderko
|
|
1882
1927
|
[@imorente]: https://github.com/imorente
|
|
1928
|
+
[@jamiebuilds]: https://github.com/jamiebuilds
|
|
1929
|
+
[@jamime]: https://github.com/jamime
|
|
1883
1930
|
[@joarwilk]: https://github.com/joarwilk
|
|
1884
1931
|
[@johansteffner]: https://github.com/johansteffner
|
|
1885
1932
|
[@jonny133]: https://github.com/jonny133
|
|
1886
1933
|
[@joshacheson]: https://github.com/joshacheson
|
|
1934
|
+
[@jtreanor]: https://github.com/jtreanor
|
|
1887
1935
|
[@keplersj]: https://github.com/keplersj
|
|
1936
|
+
[@kesne]: https://github.com/kesne
|
|
1937
|
+
[@kristof0425]: https://github.com/kristof0425
|
|
1938
|
+
[@kwonoj]: https://github.com/kwonoj
|
|
1888
1939
|
[@langovoi]: https://github.com/langovoi
|
|
1940
|
+
[@lucasmpaim]: https://github.com/lucasmpaim
|
|
1941
|
+
[@macklinu]: https://github.com/macklinu
|
|
1942
|
+
[@markelog]: https://github.com/markelog
|
|
1943
|
+
[@melvinvermeer]: https://github.com/melvinvermeer
|
|
1889
1944
|
[@mifi]: https://github.com/ionutmiftode
|
|
1945
|
+
[@mlabrum]: https://github.com/mlabrum
|
|
1946
|
+
[@mmiszy]: https://github.com/mmiszy
|
|
1947
|
+
[@mrndjo]: https://github.com/mrndjo
|
|
1948
|
+
[@msteward]: https://github.com/msteward
|
|
1890
1949
|
[@mxstbr]: https://github.com/mxstbr
|
|
1950
|
+
[@nguyenhuy]: https://github.com/nguyenhuy
|
|
1891
1951
|
[@ninjaprox]: https://github.com/ninjaprox
|
|
1892
1952
|
[@nminhnguyen]: https://github.com/NMinhNguyen
|
|
1893
1953
|
[@nornagon]: https://github.com/nornagon
|
|
1954
|
+
[@notjosh]: https://github.com/notjosh
|
|
1894
1955
|
[@notmoni]: https://github.com/NotMoni
|
|
1956
|
+
[@orieken]: https://github.com/orieken
|
|
1895
1957
|
[@orta]: https://github.com/orta
|
|
1896
1958
|
[@osmestad]: https://github.com/osmestad
|
|
1959
|
+
[@ozzieorca]: https://github.com/ozzieorca
|
|
1960
|
+
[@parvez]: https:/github.com/parvez
|
|
1897
1961
|
[@patrickkempff]: https://github.com/patrickkempff
|
|
1962
|
+
[@paulmelnikow]: https://github.com/paulmelnikow
|
|
1898
1963
|
[@peterjgrainger]: https://github.com/peterjgrainger
|
|
1964
|
+
[@pgoudreau]: https://github.com/@pgoudreau
|
|
1965
|
+
[@pinkasey]: https://github.com/pinkasey
|
|
1966
|
+
[@pveyes]: https://github.com/pveyes
|
|
1899
1967
|
[@randak]: https://github.com/randak
|
|
1900
1968
|
[@ravanscafi]: https://github.com/ravanscafi
|
|
1969
|
+
[@rogerluan]: https://github.com/rogerluan
|
|
1901
1970
|
[@rohit-gohri]: https://github.com/rohit-gohri
|
|
1971
|
+
[@rouby]: https://github.com/rouby
|
|
1972
|
+
[@rzgry]: https://github.com/rzgry
|
|
1902
1973
|
[@sajjadzamani]: https://github.com/sajjadzamani
|
|
1974
|
+
[@sandratatarevicova]: https://github.com/sandratatarevicova
|
|
1903
1975
|
[@sebinsua]: https://github.com/sebinsua
|
|
1904
1976
|
[@sgtcoolguy]: https://github.com/sgtcoolguy
|
|
1905
1977
|
[@sharkysharks]: https://github.com/sharkysharks
|
|
1978
|
+
[@shyim]: https://github.com/shyim
|
|
1906
1979
|
[@sogame]: https://github.com/sogame
|
|
1980
|
+
[@soyn]: https://github.com/Soyn
|
|
1981
|
+
[@stefanbuck]: https://github.com/stefanbuck
|
|
1982
|
+
[@steprescott]: https://github.com/steprescott
|
|
1907
1983
|
[@stevemoser]: https://github.com/stevemoser
|
|
1908
1984
|
[@stevenp]: https://github.com/stevenp
|
|
1909
1985
|
[@sunshinejr]: https://github.com/sunshinejr
|
|
1986
|
+
[@thii]: https://github.com/thii
|
|
1987
|
+
[@tibdex]: https://github.com/tibdex
|
|
1988
|
+
[@tim3trick]: https://github.com/tim3trick
|
|
1910
1989
|
[@tychota]: https://github.com/tychota
|
|
1911
1990
|
[@urkle]: https://github.com/urkle
|
|
1991
|
+
[@valscion]: https://github.com/valscion
|
|
1992
|
+
[@wardpeet]: https://github.com/wardpeet
|
|
1993
|
+
[@watchinharrison]: https://github.com/watchinharrison
|
|
1912
1994
|
[@wizardishungry]: https://github.com/wizardishungry
|
|
1913
|
-
[@
|
|
1914
|
-
[@
|
|
1915
|
-
[
|
|
1916
|
-
[
|
|
1917
|
-
[@mrndjo]: https://github.com/mrndjo
|
|
1918
|
-
[@bigkraig]: https://github.com/bigkraig
|
|
1919
|
-
[@notjosh]: https://github.com/notjosh
|
|
1920
|
-
[@iljadaderko]: https://github.com/IljaDaderko
|
|
1921
|
-
[@417-72ki]: https://github.com/417-72KI
|
|
1922
|
-
[@soyn]: https://github.com/Soyn
|
|
1923
|
-
[@tim3trick]: https://github.com/tim3trick
|
|
1924
|
-
[@doniyor2109]: https://github.com/doniyor2109
|
|
1925
|
-
[@alexandermendes]: https://github.com/alexandermendes
|
|
1926
|
-
[@jamiebuilds]: https://github.com/jamiebuilds
|
|
1927
|
-
[@hmschreiner]: https://github.com/hmschreiner
|
|
1928
|
-
[@g3offrey]: https://github.com/g3offrey
|
|
1929
|
-
[@denieler]: https://github.com/denieler
|
|
1995
|
+
[@yohix]: https://github.com/yohix
|
|
1996
|
+
[@zdenektopic]: https://github.com/zdenektopic
|
|
1997
|
+
[danger-go]: https://github.com/bdotdub/danger-go
|
|
1998
|
+
[danger-swift]: https://github.com/danger/danger-swift#danger-swift
|
package/Dockerfile
CHANGED
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ an invite, ping [@Orta](https://twitter.com/orta/) a DM on Twitter with your ema
|
|
|
112
112
|
to stay on top of Danger without all the emails from GitHub.
|
|
113
113
|
|
|
114
114
|
> This project is open source under the MIT license, which means you have full access to the source code and can modify
|
|
115
|
-
> it to fit your own needs.
|
|
115
|
+
> it to fit your own needs but don't have access to deploy.
|
|
116
116
|
>
|
|
117
117
|
> This project subscribes to the [Moya Contributors Guidelines](https://github.com/Moya/contributors) which TLDR: means
|
|
118
118
|
> we give out push access easily and often.
|
package/SECURITY.md
ADDED
|
@@ -15,4 +15,4 @@ export declare function retryableFetch(url: string | node_fetch.Request, init: n
|
|
|
15
15
|
* @param {fetch.RequestInit} [init] the usual options
|
|
16
16
|
* @returns {Promise<fetch.Response>} network-y promise
|
|
17
17
|
*/
|
|
18
|
-
export declare function api(url: string | node_fetch.Request, init: node_fetch.RequestInit, suppressErrorReporting?: boolean,
|
|
18
|
+
export declare function api(url: string | node_fetch.Request, init: node_fetch.RequestInit, suppressErrorReporting?: boolean, processEnv?: NodeJS.ProcessEnv): Promise<node_fetch.Response>;
|
|
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
14
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
15
|
if (mod && mod.__esModule) return mod;
|
|
16
16
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
18
|
__setModuleDefault(result, mod);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
@@ -64,7 +64,7 @@ var node_fetch = __importStar(require("node-fetch"));
|
|
|
64
64
|
var http_proxy_agent_1 = __importDefault(require("http-proxy-agent"));
|
|
65
65
|
var https_proxy_agent_1 = __importDefault(require("https-proxy-agent"));
|
|
66
66
|
var async_retry_1 = __importDefault(require("async-retry"));
|
|
67
|
-
var d = debug_1.debug("networking");
|
|
67
|
+
var d = (0, debug_1.debug)("networking");
|
|
68
68
|
var isJest = typeof jest !== "undefined";
|
|
69
69
|
var warn = isJest ? function () { return ""; } : console.warn;
|
|
70
70
|
var shouldRetryRequest = function (res) {
|
|
@@ -85,7 +85,7 @@ function retryableFetch(url, init) {
|
|
|
85
85
|
var _this = this;
|
|
86
86
|
return __generator(this, function (_a) {
|
|
87
87
|
retries = isJest ? 1 : 3;
|
|
88
|
-
return [2 /*return*/, async_retry_1.default(function (_, attempt) { return __awaiter(_this, void 0, void 0, function () {
|
|
88
|
+
return [2 /*return*/, (0, async_retry_1.default)(function (_, attempt) { return __awaiter(_this, void 0, void 0, function () {
|
|
89
89
|
var originalFetch, res;
|
|
90
90
|
return __generator(this, function (_a) {
|
|
91
91
|
switch (_a.label) {
|
|
@@ -98,7 +98,7 @@ function retryableFetch(url, init) {
|
|
|
98
98
|
res = _a.sent();
|
|
99
99
|
// Throwing an error will trigger a retry
|
|
100
100
|
if (attempt <= retries && shouldRetryRequest(res)) {
|
|
101
|
-
throw new Error("Request failed ["
|
|
101
|
+
throw new Error("Request failed [".concat(res.status, "]: ").concat(res.url, ". Attempting retry."));
|
|
102
102
|
}
|
|
103
103
|
return [2 /*return*/, res];
|
|
104
104
|
}
|
|
@@ -107,7 +107,7 @@ function retryableFetch(url, init) {
|
|
|
107
107
|
retries: retries,
|
|
108
108
|
onRetry: function (error, attempt) {
|
|
109
109
|
warn(error.message);
|
|
110
|
-
warn("Retry "
|
|
110
|
+
warn("Retry ".concat(attempt, " of ").concat(retries, "."));
|
|
111
111
|
},
|
|
112
112
|
})];
|
|
113
113
|
});
|
|
@@ -121,31 +121,31 @@ exports.retryableFetch = retryableFetch;
|
|
|
121
121
|
* @param {fetch.RequestInit} [init] the usual options
|
|
122
122
|
* @returns {Promise<fetch.Response>} network-y promise
|
|
123
123
|
*/
|
|
124
|
-
function api(url, init, suppressErrorReporting,
|
|
124
|
+
function api(url, init, suppressErrorReporting, processEnv) {
|
|
125
125
|
var _this = this;
|
|
126
|
-
if (
|
|
126
|
+
if (processEnv === void 0) { processEnv = process.env; }
|
|
127
127
|
var isTests = typeof jest !== "undefined";
|
|
128
128
|
if (isTests && !url.toString().includes("localhost")) {
|
|
129
|
-
var message = "No API calls in tests please: "
|
|
130
|
-
debugger;
|
|
129
|
+
var message = "No API calls in tests please: ".concat(url);
|
|
130
|
+
debugger;
|
|
131
131
|
throw new Error(message);
|
|
132
132
|
}
|
|
133
133
|
if (global.verbose && global.verbose === true) {
|
|
134
134
|
var output = ["curl", "-i"];
|
|
135
135
|
if (init.method) {
|
|
136
|
-
output.push("-X "
|
|
136
|
+
output.push("-X ".concat(init.method));
|
|
137
137
|
}
|
|
138
|
-
var showToken =
|
|
139
|
-
var token =
|
|
138
|
+
var showToken = processEnv["DANGER_VERBOSE_SHOW_TOKEN"];
|
|
139
|
+
var token = processEnv["DANGER_GITHUB_API_TOKEN"] || processEnv["GITHUB_TOKEN"];
|
|
140
140
|
if (init.headers) {
|
|
141
141
|
for (var prop in init.headers) {
|
|
142
142
|
if (init.headers.hasOwnProperty(prop)) {
|
|
143
143
|
// Don't show the token for normal verbose usage
|
|
144
144
|
if (init.headers[prop].includes(token) && !showToken) {
|
|
145
|
-
output.push("-H", "\""
|
|
145
|
+
output.push("-H", "\"".concat(prop, ": [API TOKEN]\""));
|
|
146
146
|
continue;
|
|
147
147
|
}
|
|
148
|
-
output.push("-H", "\""
|
|
148
|
+
output.push("-H", "\"".concat(prop, ": ").concat(init.headers[prop], "\""));
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -159,7 +159,7 @@ function api(url, init, suppressErrorReporting, provessEnv) {
|
|
|
159
159
|
d(output.join(" "));
|
|
160
160
|
}
|
|
161
161
|
var agent = init.agent;
|
|
162
|
-
var proxy =
|
|
162
|
+
var proxy = processEnv["HTTPS_PROXY"] || processEnv["https_proxy"] || processEnv["HTTP_PROXY"] || processEnv["http_proxy"];
|
|
163
163
|
if (!agent && proxy) {
|
|
164
164
|
var secure = url.toString().startsWith("https");
|
|
165
165
|
init.agent = secure ? new https_proxy_agent_1.default(proxy) : new http_proxy_agent_1.default(proxy);
|
|
@@ -171,7 +171,7 @@ function api(url, init, suppressErrorReporting, provessEnv) {
|
|
|
171
171
|
case 0:
|
|
172
172
|
if (!(!suppressErrorReporting && !response.ok)) return [3 /*break*/, 5];
|
|
173
173
|
clonedResponse = response.clone();
|
|
174
|
-
warn("Request failed ["
|
|
174
|
+
warn("Request failed [".concat(clonedResponse.status, "]: ").concat(clonedResponse.url));
|
|
175
175
|
return [4 /*yield*/, clonedResponse.text()];
|
|
176
176
|
case 1:
|
|
177
177
|
responseBody = _a.sent();
|
|
@@ -181,11 +181,11 @@ function api(url, init, suppressErrorReporting, provessEnv) {
|
|
|
181
181
|
return [4 /*yield*/, JSON.parse(responseBody.toString())];
|
|
182
182
|
case 3:
|
|
183
183
|
responseJSON = _a.sent();
|
|
184
|
-
warn("Response: "
|
|
184
|
+
warn("Response: ".concat(JSON.stringify(responseJSON, null, " ")));
|
|
185
185
|
return [3 /*break*/, 5];
|
|
186
186
|
case 4:
|
|
187
187
|
e_1 = _a.sent();
|
|
188
|
-
warn("Response: "
|
|
188
|
+
warn("Response: ".concat(responseBody));
|
|
189
189
|
return [3 /*break*/, 5];
|
|
190
190
|
case 5: return [2 /*return*/, response];
|
|
191
191
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../source/api/fetch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,qDAAwC;AAExC,sEAA6C;AAC7C,wEAA+C;AAE/C,4DAAoC;AAEpC,IAAM,CAAC,GAAG,aAAK,
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../source/api/fetch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,qDAAwC;AAExC,sEAA6C;AAC7C,wEAA+C;AAE/C,4DAAoC;AAEpC,IAAM,CAAC,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAA;AAG7B,IAAM,MAAM,GAAG,OAAO,IAAI,KAAK,WAAW,CAAA;AAC1C,IAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAA;AAE7C,IAAM,kBAAkB,GAAG,UAAC,GAAwB;IAClD,qFAAqF;IACrF,mFAAmF;IACnF,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CAAC,CAAA;AACJ,CAAC;AA3ED,kBA2EC"}
|
|
@@ -78,7 +78,7 @@ function getPullRequestIDForBranch(metadata, env, branch) {
|
|
|
78
78
|
switch (_a.label) {
|
|
79
79
|
case 0:
|
|
80
80
|
if (!process.env["DANGER_BITBUCKETSERVER_HOST"]) return [3 /*break*/, 2];
|
|
81
|
-
api_1 = new BitBucketServerAPI_1.BitBucketServerAPI(metadata, BitBucketServerAPI_1.bitbucketServerRepoCredentialsFromEnv(env));
|
|
81
|
+
api_1 = new BitBucketServerAPI_1.BitBucketServerAPI(metadata, (0, BitBucketServerAPI_1.bitbucketServerRepoCredentialsFromEnv)(env));
|
|
82
82
|
return [4 /*yield*/, api_1.getPullRequestsFromBranch(branch)];
|
|
83
83
|
case 1:
|
|
84
84
|
prs_1 = _a.sent();
|
|
@@ -88,7 +88,7 @@ function getPullRequestIDForBranch(metadata, env, branch) {
|
|
|
88
88
|
return [2 /*return*/, 0];
|
|
89
89
|
case 2:
|
|
90
90
|
if (!(process.env["DANGER_BITBUCKETCLOUD_OAUTH_KEY"] || process.env["DANGER_BITBUCKETCLOUD_USERNAME"])) return [3 /*break*/, 4];
|
|
91
|
-
api_2 = new BitBucketCloudAPI_1.BitBucketCloudAPI(metadata, BitBucketCloudAPI_1.bitbucketCloudCredentialsFromEnv(env));
|
|
91
|
+
api_2 = new BitBucketCloudAPI_1.BitBucketCloudAPI(metadata, (0, BitBucketCloudAPI_1.bitbucketCloudCredentialsFromEnv)(env));
|
|
92
92
|
return [4 /*yield*/, api_2.getPullRequestsFromBranch(branch)];
|
|
93
93
|
case 3:
|
|
94
94
|
prs_2 = _a.sent();
|
|
@@ -105,7 +105,7 @@ function getPullRequestIDForBranch(metadata, env, branch) {
|
|
|
105
105
|
return [4 /*yield*/, api.getPullRequests()];
|
|
106
106
|
case 5:
|
|
107
107
|
prs = (_a.sent());
|
|
108
|
-
prForBranch = lodash_find_1.default(prs, function (pr) { return pr.head.ref === branch; });
|
|
108
|
+
prForBranch = (0, lodash_find_1.default)(prs, function (pr) { return pr.head.ref === branch; });
|
|
109
109
|
if (prForBranch) {
|
|
110
110
|
return [2 /*return*/, prForBranch.number];
|
|
111
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci_source_helpers.js","sourceRoot":"","sources":["../../source/ci_source/ci_source_helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAyD;AAEzD,4DAA8B;AAC9B,uFAGyD;AAEzD,oFAAoH;AAEpH;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,GAAQ,EAAE,IAAc;IACzD,OAAO,IAAI,CAAC,KAAK,CAAC,UAAC,GAAW,IAAK,OAAA,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAlE,CAAkE,CAAC,CAAA;AACxG,CAAC;AAFD,gDAEC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAQ,EAAE,IAAc;IAC1D,OAAO,IAAI,CAAC,KAAK,CAAC,UAAC,GAAW,IAAK,OAAA,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAArD,CAAqD,CAAC,CAAA;AAC3F,CAAC;AAFD,kDAEC;AAED;;;;;;GAMG;AACH,SAAsB,yBAAyB,CAAC,QAAsB,EAAE,GAAQ,EAAE,MAAc;;;;;;yBAC1F,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,EAA1C,wBAA0C;oBACtC,QAAM,IAAI,uCAAkB,CAAC,QAAQ,EAAE,0DAAqC,
|
|
1
|
+
{"version":3,"file":"ci_source_helpers.js","sourceRoot":"","sources":["../../source/ci_source/ci_source_helpers.ts"],"names":[],"mappings":";;;;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,CAAC,CAAA,EAA/F,wBAA+F;oBAC3F,QAAM,IAAI,qCAAiB,CAAC,QAAQ,EAAE,IAAA,oDAAgC,EAAC,GAAG,CAAC,CAAC,CAAA;oBACtE,qBAAM,KAAG,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAA;;oBAAjD,QAAM,SAA2C;oBACvD,IAAI,KAAG,CAAC,MAAM,EAAE;wBACd,sBAAO,KAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAA;qBACjB;oBACD,sBAAO,CAAC,EAAA;;oBAGJ,KAAK,GAAG,GAAG,CAAC,yBAAyB,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,CAAA;oBACnE,IAAI,CAAC,KAAK,EAAE;wBACV,sBAAO,CAAC,EAAA;qBACT;oBACK,GAAG,GAAG,IAAI,qBAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;oBAC7B,qBAAM,GAAG,CAAC,eAAe,EAAE,EAAA;;oBAAlC,GAAG,GAAG,CAAC,SAA2B,CAAU;oBAC5C,WAAW,GAAgB,IAAA,qBAAI,EAAC,GAAG,EAAE,UAAC,EAAe,IAAK,OAAA,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,MAAM,EAAtB,CAAsB,CAAC,CAAA;oBACvF,IAAI,WAAW,EAAE;wBACf,sBAAO,WAAW,CAAC,MAAM,EAAA;qBAC1B;oBACD,sBAAO,CAAC,EAAA;;;;CACT;AA7BD,8DA6BC"}
|
|
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
14
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
15
|
if (mod && mod.__esModule) return mod;
|
|
16
16
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
18
|
__setModuleDefault(result, mod);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
@@ -54,12 +54,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
54
54
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
58
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
59
|
+
if (ar || !(i in from)) {
|
|
60
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
61
|
+
ar[i] = from[i];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
63
65
|
};
|
|
64
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
67
|
exports.getCISource = exports.getCISourceForExternal = exports.getCISourceForEnv = void 0;
|
|
@@ -73,7 +75,7 @@ var path_1 = require("path");
|
|
|
73
75
|
* @returns {?CISource} a CI source if it's OK, otherwise Danger can't run.
|
|
74
76
|
*/
|
|
75
77
|
function getCISourceForEnv(env) {
|
|
76
|
-
var availableProviders =
|
|
78
|
+
var availableProviders = __spreadArray([], providers_1.providers, true).map(function (Provider) { return new Provider(env); }).filter(function (x) { return x.isCI; });
|
|
77
79
|
return availableProviders && availableProviders.length > 0 ? availableProviders[0] : undefined;
|
|
78
80
|
}
|
|
79
81
|
exports.getCISourceForEnv = getCISourceForEnv;
|
|
@@ -89,14 +91,15 @@ function getCISourceForExternal(env, modulePath) {
|
|
|
89
91
|
return __awaiter(this, void 0, void 0, function () {
|
|
90
92
|
var path;
|
|
91
93
|
return __generator(this, function (_a) {
|
|
92
|
-
path = path_1.resolve(process.cwd(), modulePath);
|
|
94
|
+
path = (0, path_1.resolve)(process.cwd(), modulePath);
|
|
93
95
|
return [2 /*return*/, new Promise(function (resolve) {
|
|
94
96
|
fs.stat(path, function (error, stat) {
|
|
95
97
|
if (error) {
|
|
96
|
-
console.error("could not load CI provider at "
|
|
98
|
+
console.error("could not load CI provider at ".concat(modulePath, " due to ").concat(error));
|
|
97
99
|
}
|
|
98
100
|
if (stat && stat.isFile()) {
|
|
99
|
-
|
|
101
|
+
// eslint-disable-next-line
|
|
102
|
+
var externalModule = require(path); // @typescript-eslint/no-var-requires @typescript-eslint/no-require-imports
|
|
100
103
|
var moduleConstructor = externalModule.default || externalModule;
|
|
101
104
|
resolve(new moduleConstructor(env));
|
|
102
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_ci_source.js","sourceRoot":"","sources":["../../source/ci_source/get_ci_source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_ci_source.js","sourceRoot":"","sources":["../../source/ci_source/get_ci_source.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAuC;AACvC,qCAAwB;AACxB,6BAA8B;AAG9B;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,GAAQ;IACxC,IAAM,kBAAkB,GAAG,kBAAK,qBAAiB,QAAE,GAAG,CAAC,UAAA,QAAQ,IAAI,OAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAjB,CAAiB,CAAC,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAA;IACzG,OAAO,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAChG,CAAC;AAHD,8CAGC;AAED;;;;;;;GAOG;AACH,SAAsB,sBAAsB,CAAC,GAAQ,EAAE,UAAkB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