danger 12.3.1 → 12.3.2
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/CHANGELOG.md +6 -2
- package/distribution/api/fetch.js +6 -2
- package/distribution/api/fetch.js.map +1 -1
- package/distribution/ci_source/ci_source.d.ts +1 -1
- package/distribution/ci_source/ci_source_helpers.js +1 -1
- package/distribution/ci_source/get_ci_source.js +6 -2
- package/distribution/ci_source/get_ci_source.js.map +1 -1
- package/distribution/ci_source/providers/AppCenter.js +6 -2
- package/distribution/ci_source/providers/AppCenter.js.map +1 -1
- package/distribution/ci_source/providers/CodeBuild.js +1 -1
- package/distribution/ci_source/providers/Codeship.js +1 -1
- package/distribution/commands/ci/resetStatus.d.ts +1 -1
- package/distribution/commands/ci/resetStatus.js +1 -1
- package/distribution/commands/ci/runner.d.ts +1 -1
- package/distribution/commands/ci/runner.js +1 -1
- package/distribution/commands/danger-init.js +6 -2
- package/distribution/commands/danger-init.js.map +1 -1
- package/distribution/commands/danger-pr.js +1 -1
- package/distribution/commands/danger-process.js +5 -1
- package/distribution/commands/danger-process.js.map +1 -1
- package/distribution/commands/danger-runner.js +1 -1
- package/distribution/commands/init/add-to-ci.js +1 -1
- package/distribution/commands/init/default-dangerfile.js +5 -1
- package/distribution/commands/init/default-dangerfile.js.map +1 -1
- package/distribution/commands/init/state-setup.js +6 -2
- package/distribution/commands/init/state-setup.js.map +1 -1
- package/distribution/commands/utils/chainsmoker.d.ts +7 -7
- package/distribution/commands/utils/fileUtils.js +12 -0
- package/distribution/commands/utils/fileUtils.js.map +1 -1
- package/distribution/commands/utils/getRuntimeCISource.js +1 -1
- package/distribution/commands/utils/reporting.d.ts +1 -1
- package/distribution/commands/utils/runDangerSubprocess.js +1 -1
- package/distribution/commands/utils/validateDangerfileExists.js +5 -1
- package/distribution/commands/utils/validateDangerfileExists.js.map +1 -1
- package/distribution/danger.d.ts +7 -7
- package/distribution/danger.js.flow +7 -7
- package/distribution/dsl/Aliases.d.ts +1 -1
- package/distribution/dsl/BitBucketCloudDSL.d.ts +1 -1
- package/distribution/dsl/BitBucketServerDSL.d.ts +2 -2
- package/distribution/dsl/GitDSL.d.ts +1 -1
- package/distribution/platforms/BitBucketCloud.d.ts +1 -1
- package/distribution/platforms/BitBucketCloud.js +1 -1
- package/distribution/platforms/BitBucketServer.d.ts +1 -1
- package/distribution/platforms/BitBucketServer.js +1 -1
- package/distribution/platforms/FakePlatform.js +1 -1
- package/distribution/platforms/GitHub.d.ts +1 -1
- package/distribution/platforms/GitHub.js +1 -1
- package/distribution/platforms/GitLab.js +1 -1
- package/distribution/platforms/LocalGit.js +1 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.d.ts +4 -4
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js +1 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudGit.js +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js +1 -1
- package/distribution/platforms/bitbucket_server/BitBucketServerAPI.d.ts +3 -3
- package/distribution/platforms/bitbucket_server/BitBucketServerAPI.js +1 -1
- package/distribution/platforms/bitbucket_server/BitBucketServerGit.js +1 -1
- package/distribution/platforms/git/gitJSONToGitDSL.d.ts +2 -2
- package/distribution/platforms/git/gitJSONToGitDSL.js +6 -2
- package/distribution/platforms/git/gitJSONToGitDSL.js.map +1 -1
- package/distribution/platforms/git/localLogGitCommits.d.ts +2 -2
- package/distribution/platforms/github/GitHubAPI.d.ts +6 -6
- package/distribution/platforms/github/GitHubAPI.js +1 -1
- package/distribution/platforms/github/GitHubGit.d.ts +1 -1
- package/distribution/platforms/github/GitHubGit.js +1 -1
- package/distribution/platforms/github/GitHubUtils.d.ts +5 -5
- package/distribution/platforms/github/GitHubUtils.js +1 -1
- package/distribution/platforms/github/comms/checks/githubAppSupport.js +6 -2
- package/distribution/platforms/github/comms/checks/githubAppSupport.js.map +1 -1
- package/distribution/platforms/github/comms/checks/resultsToCheck.d.ts +1 -1
- package/distribution/platforms/github/comms/checks/resultsToCheck.js +1 -1
- package/distribution/platforms/github/comms/checksCommenter.d.ts +1 -1
- package/distribution/platforms/github/comms/checksCommenter.js +1 -1
- package/distribution/platforms/github/comms/issueCommenter.d.ts +1 -1
- package/distribution/platforms/github/comms/issueCommenter.js +1 -1
- package/distribution/platforms/github/customGitHubRequire.d.ts +1 -1
- package/distribution/platforms/github/customGitHubRequire.js +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.d.ts +7 -7
- package/distribution/platforms/gitlab/GitLabAPI.js +1 -1
- package/distribution/platforms/gitlab/GitLabGit.js +1 -1
- package/distribution/platforms/platform.d.ts +2 -2
- package/distribution/platforms/platform.js +5 -1
- package/distribution/platforms/platform.js.map +1 -1
- package/distribution/platforms/pullRequestParser.js +5 -1
- package/distribution/platforms/pullRequestParser.js.map +1 -1
- package/distribution/runner/Dangerfile.d.ts +2 -2
- package/distribution/runner/Executor.js +1 -1
- package/distribution/runner/dslGenerator.js +1 -1
- package/distribution/runner/jsonToContext.js +1 -1
- package/distribution/runner/jsonToDSL.js +6 -2
- package/distribution/runner/jsonToDSL.js.map +1 -1
- package/distribution/runner/runners/inline.js +40 -16
- package/distribution/runner/runners/inline.js.map +1 -1
- package/distribution/runner/runners/utils/cleanDangerfile.d.ts +1 -1
- package/distribution/runner/runners/utils/transpiler.d.ts +1 -1
- package/distribution/runner/runners/utils/transpiler.js +19 -10
- package/distribution/runner/runners/utils/transpiler.js.map +1 -1
- package/distribution/runner/templates/bitbucketCloudTemplate.d.ts +1 -1
- package/distribution/runner/templates/bitbucketServerTemplate.d.ts +1 -1
- package/distribution/runner/templates/githubIssueTemplate.d.ts +1 -1
- package/package.json +2 -2
|
@@ -77,7 +77,7 @@ export interface GitJSONDSL {
|
|
|
77
77
|
readonly commits: GitCommit[];
|
|
78
78
|
}
|
|
79
79
|
/** The shape of the Chainsmoker response */
|
|
80
|
-
|
|
80
|
+
type GitMatchResult = {
|
|
81
81
|
/** Did any file paths match from the git modified list? */
|
|
82
82
|
modified: any;
|
|
83
83
|
/** Did any file paths match from the git created list? */
|
|
@@ -53,7 +53,7 @@ export declare class BitBucketCloud implements Platform {
|
|
|
53
53
|
createInlineComment: (git: GitDSL, comment: string, path: string, line: number) => Promise<any>;
|
|
54
54
|
updateInlineComment: (comment: string, commentId: string) => Promise<any>;
|
|
55
55
|
deleteInlineComment: (commentId: string) => Promise<boolean>;
|
|
56
|
-
updateStatus: (passed: boolean | "pending", message: string, url?: string
|
|
56
|
+
updateStatus: (passed: boolean | "pending", message: string, url?: string, dangerID?: string, ciCommitHash?: string) => Promise<boolean>;
|
|
57
57
|
getFileContents: (filePath: string, repoSlug?: string | undefined, ref?: string | undefined) => Promise<string>;
|
|
58
58
|
}
|
|
59
59
|
export declare const bitbucketCloudJSONToBitBucketCloudDSL: (bitbucket: BitBucketCloudJSONDSL, api: BitBucketCloudAPI) => BitBucketCloudDSL;
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -28,7 +28,7 @@ export declare class BitBucketServer implements Platform {
|
|
|
28
28
|
* Fails the current build, if status setting succeeds
|
|
29
29
|
* then return true.
|
|
30
30
|
*/
|
|
31
|
-
updateStatus: (passed: boolean | "pending", message: string, url?: string
|
|
31
|
+
updateStatus: (passed: boolean | "pending", message: string, url?: string, dangerID?: string, ciCommitHash?: string) => Promise<boolean>;
|
|
32
32
|
/**
|
|
33
33
|
* Returns the `bitBucket_server` object on the Danger DSL
|
|
34
34
|
*
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -3,7 +3,7 @@ import { GitHubAPI } from "./github/GitHubAPI";
|
|
|
3
3
|
import { Octokit as NodeGitHub } from "@octokit/rest";
|
|
4
4
|
import { Platform } from "./platform";
|
|
5
5
|
/** Handles conforming to the Platform Interface for GitHub, API work is handle by GitHubAPI */
|
|
6
|
-
export
|
|
6
|
+
export type GitHubType = Platform & {
|
|
7
7
|
api: GitHubAPI;
|
|
8
8
|
};
|
|
9
9
|
export declare function GitHub(api: GitHubAPI): GitHubType;
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -4,7 +4,7 @@ import { api as fetch } from "../../api/fetch";
|
|
|
4
4
|
import { BitBucketCloudPRDSL, BitBucketCloudCommit, BitBucketCloudPRActivity, BitBucketCloudPRComment, BitBucketCloudAPIDSL } from "../../dsl/BitBucketCloudDSL";
|
|
5
5
|
import { Comment } from "../platform";
|
|
6
6
|
import { RepoMetaData } from "../../dsl/RepoMetaData";
|
|
7
|
-
export
|
|
7
|
+
export type BitBucketCloudCredentials = {
|
|
8
8
|
/** Unique ID for this user, must be wrapped with brackets */
|
|
9
9
|
uuid?: string;
|
|
10
10
|
} & (BitBucketCloudCredentialsOAuth | BitBucketCloudCredentialsPassword | BitBucketCloudCredentialsRepoAccessToken);
|
|
@@ -43,7 +43,7 @@ export declare class BitBucketCloudAPI implements BitBucketCloudAPIDSL {
|
|
|
43
43
|
getPullRequestDiff: () => Promise<string>;
|
|
44
44
|
getPullRequestComments: () => Promise<BitBucketCloudPRComment[]>;
|
|
45
45
|
getPullRequestActivities: () => Promise<BitBucketCloudPRActivity[]>;
|
|
46
|
-
getFileContents: (filePath: string, repoSlug?: string
|
|
46
|
+
getFileContents: (filePath: string, repoSlug?: string, ref?: string) => Promise<string>;
|
|
47
47
|
getDangerMainComments: (dangerID: string) => Promise<BitBucketCloudPRComment[]>;
|
|
48
48
|
getDangerInlineComments: (dangerID: string) => Promise<Comment[]>;
|
|
49
49
|
postBuildStatus: (commitId: string, payload: {
|
|
@@ -59,8 +59,8 @@ export declare class BitBucketCloudAPI implements BitBucketCloudAPIDSL {
|
|
|
59
59
|
updateComment: (id: string, comment: string) => Promise<any>;
|
|
60
60
|
private api;
|
|
61
61
|
private performAPI;
|
|
62
|
-
get: (url: string, headers?: any, suppressErrors?: boolean
|
|
63
|
-
post: (url: string, headers?: any, body?: any, suppressErrors?: boolean
|
|
62
|
+
get: (url: string, headers?: any, suppressErrors?: boolean) => Promise<node_fetch.Response>;
|
|
63
|
+
post: (url: string, headers?: any, body?: any, suppressErrors?: boolean) => Promise<node_fetch.Response>;
|
|
64
64
|
put: (url: string, headers?: any, body?: any) => Promise<node_fetch.Response>;
|
|
65
65
|
delete: (url: string, headers?: any, body?: any) => Promise<node_fetch.Response>;
|
|
66
66
|
}
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -30,7 +30,7 @@ export declare class BitBucketServerAPI implements BitBucketServerAPIDSL {
|
|
|
30
30
|
getIssues: () => Promise<JIRAIssue[]>;
|
|
31
31
|
getDangerComments: (dangerID: string) => Promise<BitBucketServerPRComment[]>;
|
|
32
32
|
getDangerInlineComments: (dangerID: string) => Promise<Comment[]>;
|
|
33
|
-
getFileContents: (filePath: string, repoSlug?: string
|
|
33
|
+
getFileContents: (filePath: string, repoSlug?: string, refspec?: string) => Promise<string>;
|
|
34
34
|
postBuildStatus: (commitId: string, payload: {
|
|
35
35
|
state: string;
|
|
36
36
|
key: string;
|
|
@@ -49,8 +49,8 @@ export declare class BitBucketServerAPI implements BitBucketServerAPIDSL {
|
|
|
49
49
|
version: number;
|
|
50
50
|
}, comment: string) => Promise<any>;
|
|
51
51
|
private api;
|
|
52
|
-
get: (path: string, headers?: any, suppressErrors?: boolean
|
|
53
|
-
post: (path: string, headers?: any, body?: any, suppressErrors?: boolean
|
|
52
|
+
get: (path: string, headers?: any, suppressErrors?: boolean) => Promise<node_fetch.Response>;
|
|
53
|
+
post: (path: string, headers?: any, body?: any, suppressErrors?: boolean) => Promise<node_fetch.Response>;
|
|
54
54
|
put: (path: string, headers?: any, body?: any) => Promise<node_fetch.Response>;
|
|
55
55
|
delete: (path: string, headers?: any, body?: any) => Promise<node_fetch.Response>;
|
|
56
56
|
}
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -15,6 +15,6 @@ export interface GitJSONToGitDSLConfig {
|
|
|
15
15
|
getFullDiff?: (base: string, head: string, staging?: boolean) => Promise<string>;
|
|
16
16
|
getStructuredDiffForFile?: (base: string, head: string, filename: string) => Promise<GitStructuredDiff>;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
export
|
|
18
|
+
export type GitStructuredDiff = Pick<parseDiff.File, "chunks" | "from" | "to">[];
|
|
19
|
+
export type Changes = parseDiff.Change[];
|
|
20
20
|
export declare const gitJSONToGitDSL: (gitJSONRep: GitJSONDSL, config: GitJSONToGitDSLConfig) => GitDSL;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -33,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
33
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
38
|
function step(op) {
|
|
35
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
37
41
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
38
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
43
|
switch (op[0]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitJSONToGitDSL.js","sourceRoot":"","sources":["../../../source/platforms/git/gitJSONToGitDSL.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gitJSONToGitDSL.js","sourceRoot":"","sources":["../../../source/platforms/git/gitJSONToGitDSL.ts"],"names":[],"mappings":";;;;;;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are const fieldMap: {
|
|
|
10
10
|
committerDate: string;
|
|
11
11
|
subject: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type GitLogOptions = {
|
|
14
14
|
number: number;
|
|
15
15
|
branch: string;
|
|
16
16
|
fields: ReadonlyArray<Partial<keyof typeof fieldMap>>;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type GitLogCommit = {
|
|
19
19
|
hash: string;
|
|
20
20
|
treeHash: string;
|
|
21
21
|
abbrevParentHashes: string;
|
|
@@ -4,7 +4,7 @@ import { GitHubPRDSL, GitHubIssueComment, GitHubUser } from "../../dsl/GitHubDSL
|
|
|
4
4
|
import { api as fetch } from "../../api/fetch";
|
|
5
5
|
import { RepoMetaData } from "../../dsl/RepoMetaData";
|
|
6
6
|
import { CheckOptions } from "./comms/checks/resultsToCheck";
|
|
7
|
-
export
|
|
7
|
+
export type APIToken = string;
|
|
8
8
|
export interface GitHubFile {
|
|
9
9
|
filename: string;
|
|
10
10
|
patch: string;
|
|
@@ -24,7 +24,7 @@ export declare class GitHubAPI {
|
|
|
24
24
|
* I wouldn't have a problem with moving this to use this API under the hood
|
|
25
25
|
* but for now that's just a refactor someone can try.
|
|
26
26
|
*/
|
|
27
|
-
getExternalAPI: (accessTokenForApp?: string
|
|
27
|
+
getExternalAPI: (accessTokenForApp?: string) => GitHubNodeAPI;
|
|
28
28
|
/**
|
|
29
29
|
* Grabs the contents of an individual file on GitHub
|
|
30
30
|
*
|
|
@@ -33,7 +33,7 @@ export declare class GitHubAPI {
|
|
|
33
33
|
* @returns {Promise<string>} text contents
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
|
-
fileContents: (path: string, repoSlug?: string
|
|
36
|
+
fileContents: (path: string, repoSlug?: string, ref?: string) => Promise<string>;
|
|
37
37
|
getDangerCommentIDs: (dangerID: string) => Promise<string[]>;
|
|
38
38
|
updateCommentWithID: (id: string, comment: string) => Promise<any>;
|
|
39
39
|
deleteCommentWithID: (id: string) => Promise<boolean>;
|
|
@@ -68,10 +68,10 @@ export declare class GitHubAPI {
|
|
|
68
68
|
getReviewerRequests: () => Promise<any>;
|
|
69
69
|
getReviews: () => Promise<any>;
|
|
70
70
|
getIssue: () => Promise<any>;
|
|
71
|
-
updateStatus: (passed: boolean | "pending", message: string, url?: string
|
|
71
|
+
updateStatus: (passed: boolean | "pending", message: string, url?: string, dangerID?: string, ciCommitHash?: string) => Promise<any>;
|
|
72
72
|
postCheckRun: (check: CheckOptions, token: string) => Promise<any>;
|
|
73
73
|
private api;
|
|
74
74
|
get: (path: string, headers?: any) => Promise<node_fetch.Response>;
|
|
75
|
-
post: (path: string, headers?: any, body?: any, suppressErrors?: boolean
|
|
76
|
-
patch: (path: string, headers?: any, body?: any, suppressErrors?: boolean
|
|
75
|
+
post: (path: string, headers?: any, body?: any, suppressErrors?: boolean) => Promise<node_fetch.Response>;
|
|
76
|
+
patch: (path: string, headers?: any, body?: any, suppressErrors?: boolean) => Promise<node_fetch.Response>;
|
|
77
77
|
}
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -2,5 +2,5 @@ import { GitDSL, GitJSONDSL } from "../../dsl/GitDSL";
|
|
|
2
2
|
import { GitHubDSL } from "../../dsl/GitHubDSL";
|
|
3
3
|
import { GitHubAPI } from "../github/GitHubAPI";
|
|
4
4
|
export default function gitDSLForGitHub(api: GitHubAPI): Promise<GitJSONDSL>;
|
|
5
|
-
export declare const gitHubGitDSL: (github: GitHubDSL, json: GitJSONDSL, githubAPI?: GitHubAPI
|
|
5
|
+
export declare const gitHubGitDSL: (github: GitHubDSL, json: GitJSONDSL, githubAPI?: GitHubAPI) => GitDSL;
|
|
6
6
|
export declare const emptyGitJSON: () => GitJSONDSL;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { components as OctokitOpenApiTypes } from "@octokit/openapi-types";
|
|
2
2
|
import { GitHubPRDSL, GitHubUtilsDSL } from "./../../dsl/GitHubDSL";
|
|
3
|
-
export
|
|
3
|
+
export type GetContentResponseData = OctokitOpenApiTypes["schemas"]["content-file"] | OctokitOpenApiTypes["schemas"]["content-symlink"] | OctokitOpenApiTypes["schemas"]["content-submodule"];
|
|
4
4
|
export declare function isFileContents(response: GetContentResponseData): response is OctokitOpenApiTypes["schemas"]["content-file"];
|
|
5
5
|
import { Octokit as GitHub } from "@octokit/rest";
|
|
6
6
|
declare const utils: (pr: GitHubPRDSL | undefined, api: GitHub) => GitHubUtilsDSL;
|
|
7
7
|
/** Generates the fileContents function, needed so that Peril can re-create this func for an event */
|
|
8
|
-
export declare const fileContentsGenerator: (api: GitHub, defaultRepoSlug: string | undefined, defaultRef: string | undefined) => (path: string, repoSlug?: string
|
|
8
|
+
export declare const fileContentsGenerator: (api: GitHub, defaultRepoSlug: string | undefined, defaultRef: string | undefined) => (path: string, repoSlug?: string, ref?: string) => Promise<string>;
|
|
9
9
|
/** Generates the createUpdatedIssueWithID function, needed so that Peril can re-create this func for an event */
|
|
10
10
|
export declare const createUpdatedIssueWithIDGenerator: (api: GitHub) => (id: string, content: string, settings: {
|
|
11
11
|
title: string;
|
|
@@ -29,7 +29,7 @@ interface PRCreationConfig {
|
|
|
29
29
|
/** Base branch for the new branch e.g. what should Danger create the new branch from */
|
|
30
30
|
baseBranch: string;
|
|
31
31
|
}
|
|
32
|
-
export declare const createOrUpdatePR: (pr: GitHubPRDSL | undefined, api: GitHub) => (config: PRCreationConfig, fileMap: any) => Promise<import("@octokit/
|
|
32
|
+
export declare const createOrUpdatePR: (pr: GitHubPRDSL | undefined, api: GitHub) => (config: PRCreationConfig, fileMap: any) => Promise<import("@octokit/types").OctokitResponse<{
|
|
33
33
|
url: string;
|
|
34
34
|
id: number;
|
|
35
35
|
node_id: string;
|
|
@@ -581,7 +581,7 @@ export declare const createOrUpdatePR: (pr: GitHubPRDSL | undefined, api: GitHub
|
|
|
581
581
|
additions: number;
|
|
582
582
|
deletions: number;
|
|
583
583
|
changed_files: number;
|
|
584
|
-
}, 200> | import("@octokit/
|
|
584
|
+
}, 200> | import("@octokit/types").OctokitResponse<{
|
|
585
585
|
url: string;
|
|
586
586
|
id: number;
|
|
587
587
|
node_id: string;
|
|
@@ -1142,5 +1142,5 @@ export declare const createOrAddLabel: (pr: GitHubPRDSL | undefined, api: GitHub
|
|
|
1142
1142
|
owner: string;
|
|
1143
1143
|
repo: string;
|
|
1144
1144
|
id: number;
|
|
1145
|
-
}
|
|
1145
|
+
}) => Promise<void>;
|
|
1146
1146
|
export default utils;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -33,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
33
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
38
|
function step(op) {
|
|
35
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
37
41
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
38
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
43
|
switch (op[0]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubAppSupport.js","sourceRoot":"","sources":["../../../../../source/platforms/github/comms/checks/githubAppSupport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"githubAppSupport.js","sourceRoot":"","sources":["../../../../../source/platforms/github/comms/checks/githubAppSupport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAmC;AACnC,0DAA8B;AAE9B,SAAS;AAET,+DAA+D;AAC/D,IAAM,gBAAgB,GAAG,UAAC,KAAa,EAAE,GAAW;IAClD,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAA;IACnD,IAAM,OAAO,GAAW,GAAG,GAAG,GAAG,CAAA;IACjC,IAAM,UAAU,GAAG,GAAG,CAAA;IACtB,IAAM,OAAO,GAAW;QACtB,GAAG,EAAE,OAAO;QACZ,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,KAAK;KACX,CAAA;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;AAC9D,CAAC,CAAA;AAED,yDAAyD;AAEzD,IAAM,iCAAiC,GAAG,UAAC,KAAa,EAAE,cAAsB,EAAE,GAAW;IAC3F,IAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;QACtD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;QAC3C,CAAC,CAAC,wBAAwB,CAAA;IAC5B,IAAM,GAAG,GAAG,UAAG,MAAM,gCAAsB,cAAc,mBAAgB,CAAA;IACzE,IAAM,OAAO,GAAG;QACd,MAAM,EAAE,iDAAiD;QACzD,aAAa,EAAE,iBAAU,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAE;KACxD,CAAA;IACD,OAAO,IAAA,oBAAK,EAAC,GAAG,EAAE;QAChB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACxB,OAAO,SAAA;QACP,MAAM,EAAE,MAAM;KACf,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,4EAA4E;AACrE,IAAM,6BAA6B,GAAG,UAAO,KAAa,EAAE,cAAsB,EAAE,GAAW;;;;oBACnF,qBAAM,iCAAiC,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,CAAC,EAAA;;gBAA9E,QAAQ,GAAG,SAAmE;gBAChE,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;gBAAnC,WAAW,GAAG,SAAqB;gBACzC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAChB,OAAO,CAAC,KAAK,CAAC,4CAAqC,cAAc,CAAE,CAAC,CAAA;oBACpE,OAAO,CAAC,KAAK,CAAC,2BAAoB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAE,CAAC,CAAA;iBACjE;gBACD,sBAAO,WAAW,CAAC,KAAe,EAAA;;;KACnC,CAAA;AARY,QAAA,6BAA6B,iCAQzC"}
|
|
@@ -36,4 +36,4 @@ export interface CheckOptions {
|
|
|
36
36
|
images?: CheckImages[];
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
export declare const resultsToCheck: (results: DangerResults, options: ExecutorOptions, pr: GitHubPRDSL, api: GitHubNodeAPI, ciCommitHash?: string
|
|
39
|
+
export declare const resultsToCheck: (results: DangerResults, options: ExecutorOptions, pr: GitHubPRDSL, api: GitHubNodeAPI, ciCommitHash?: string, name?: string) => Promise<CheckOptions>;
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -16,6 +16,6 @@ export declare const getCustomAppAuthFromEnv: () => {
|
|
|
16
16
|
* @param api
|
|
17
17
|
*/
|
|
18
18
|
export declare const GitHubChecksCommenter: (api: GitHubAPI) => {
|
|
19
|
-
platformResultsPreMapper: (results: DangerResults, options: ExecutorOptions, ciCommitHash?: string
|
|
19
|
+
platformResultsPreMapper: (results: DangerResults, options: ExecutorOptions, ciCommitHash?: string) => Promise<DangerResults>;
|
|
20
20
|
} | undefined;
|
|
21
21
|
export declare const tweetSizedResultsFromResults: (results: DangerResults, checksResponse: any) => DangerResults;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -19,7 +19,7 @@ export declare const GitHubIssueCommenter: (api: GitHubAPI) => {
|
|
|
19
19
|
* Fails the current build, if status setting succeeds
|
|
20
20
|
* then return true.
|
|
21
21
|
*/
|
|
22
|
-
updateStatus: (passed: boolean | "pending", message: string, url?: string
|
|
22
|
+
updateStatus: (passed: boolean | "pending", message: string, url?: string, dangerID?: string) => Promise<boolean>;
|
|
23
23
|
/**
|
|
24
24
|
* Gets inline comments for current PR
|
|
25
25
|
*/
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -22,7 +22,7 @@ export declare function getGitHubFileContentsFromLocation(token: string, locatio
|
|
|
22
22
|
* Returns either the contents or an empty string.
|
|
23
23
|
*/
|
|
24
24
|
export declare function getGitHubFileContents(token: string, repoSlug: string, path: string, ref: string | null, showError?: boolean): Promise<string>;
|
|
25
|
-
export declare const shouldUseGitHubOverride: (request: string, parent?: NodeModule
|
|
25
|
+
export declare const shouldUseGitHubOverride: (request: string, parent?: NodeModule) => boolean;
|
|
26
26
|
export declare const customGitHubResolveRequest: (token: string) => (request: string, parent: {
|
|
27
27
|
filename: string;
|
|
28
28
|
}) => Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as Types from "@gitbeaker/rest";
|
|
2
2
|
import { Env } from "../../ci_source/ci_source";
|
|
3
3
|
import { RepoMetaData } from "../../dsl/RepoMetaData";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type GitLabAPIToken = string;
|
|
5
|
+
export type GitLabOAuthToken = string;
|
|
6
6
|
export interface RootGitLabAPICredentials {
|
|
7
7
|
host: string;
|
|
8
8
|
}
|
|
@@ -12,7 +12,7 @@ export interface GitLabAPICredentialsOptionsWithAccessToken extends RootGitLabAP
|
|
|
12
12
|
export interface GitLabAPICredentialsOptionsWithOAuthToken extends RootGitLabAPICredentials {
|
|
13
13
|
oauthToken: GitLabOAuthToken;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type GitLabAPICredentials = GitLabAPICredentialsOptionsWithAccessToken | GitLabAPICredentialsOptionsWithOAuthToken;
|
|
16
16
|
export declare function getGitLabHostFromEnv(env: Env): string;
|
|
17
17
|
export declare function getGitLabAPICredentialsFromEnv(env: Env): GitLabAPICredentials;
|
|
18
18
|
declare class GitLabAPI {
|
|
@@ -36,15 +36,15 @@ declare class GitLabAPI {
|
|
|
36
36
|
getMergeRequestDiscussions: () => Promise<Types.DiscussionSchema[]>;
|
|
37
37
|
getMergeRequestNotes: () => Promise<Types.MergeRequestNoteSchema[]>;
|
|
38
38
|
createMergeRequestDiscussion: (content: string, options?: {
|
|
39
|
-
position?: Types.DiscussionNotePositionOptions
|
|
40
|
-
}
|
|
39
|
+
position?: Types.DiscussionNotePositionOptions;
|
|
40
|
+
}) => Promise<Types.DiscussionSchema>;
|
|
41
41
|
createMergeRequestNote: (body: string) => Promise<Types.MergeRequestNoteSchema>;
|
|
42
42
|
updateMergeRequestDiscussionNote: (discussionId: string, noteId: number, body: string) => Promise<Types.MergeRequestDiscussionNoteSchema>;
|
|
43
43
|
updateMergeRequestNote: (id: number, body: string) => Promise<Types.MergeRequestNoteSchema>;
|
|
44
44
|
deleteMergeRequestDiscussionNote: (discussionId: string, noteId: number) => Promise<boolean>;
|
|
45
45
|
deleteMergeRequestNote: (id: number) => Promise<boolean>;
|
|
46
|
-
getFileContents: (path: string, slug?: string
|
|
47
|
-
getCompareChanges: (base?: string
|
|
46
|
+
getFileContents: (path: string, slug?: string, ref?: string) => Promise<string>;
|
|
47
|
+
getCompareChanges: (base?: string, head?: string) => Promise<Types.CommitDiffSchema[]>;
|
|
48
48
|
addLabels: (...labels: string[]) => Promise<boolean>;
|
|
49
49
|
removeLabels: (...labels: string[]) => Promise<boolean>;
|
|
50
50
|
}
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|