danger 11.2.8 → 11.3.1
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 +13 -0
- package/distribution/ci_source/providers/GitHubActions.d.ts +20 -0
- package/distribution/ci_source/providers/GitHubActions.js +20 -0
- package/distribution/ci_source/providers/GitHubActions.js.map +1 -1
- package/distribution/commands/danger-runner.js +3 -2
- package/distribution/commands/danger-runner.js.map +1 -1
- package/distribution/danger.d.ts +14 -277
- package/distribution/danger.js.flow +12 -302
- package/distribution/dsl/GitHubDSL.d.ts +6 -1
- package/distribution/dsl/GitLabDSL.d.ts +6 -246
- package/distribution/platforms/GitHub.js +1 -0
- package/distribution/platforms/GitHub.js.map +1 -1
- package/distribution/platforms/GitLab.d.ts +11 -10
- package/distribution/platforms/GitLab.js +33 -26
- package/distribution/platforms/GitLab.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js +4 -3
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js.map +1 -1
- package/distribution/platforms/github/GitHubAPI.js +6 -1
- package/distribution/platforms/github/GitHubAPI.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.d.ts +18 -108
- package/distribution/platforms/gitlab/GitLabAPI.js +22 -21
- package/distribution/platforms/gitlab/GitLabAPI.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabGit.d.ts +3 -2
- package/distribution/platforms/gitlab/GitLabGit.js.map +1 -1
- package/distribution/runner/Dangerfile.d.ts +2 -3
- package/distribution/runner/Dangerfile.js.map +1 -1
- package/distribution/runner/templates/githubIssueTemplate.js +1 -1
- package/distribution/runner/templates/githubIssueTemplate.js.map +1 -1
- package/package.json +3 -2
|
@@ -1902,8 +1902,14 @@ declare interface GitHubAPIPR {
|
|
|
1902
1902
|
|
|
1903
1903
|
/**
|
|
1904
1904
|
* The PR number
|
|
1905
|
+
* @deprecated use `pull_number` instead
|
|
1905
1906
|
*/
|
|
1906
1907
|
number: number;
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* The PR number
|
|
1911
|
+
*/
|
|
1912
|
+
pull_number: number;
|
|
1907
1913
|
}
|
|
1908
1914
|
declare interface GitHubReviewers {
|
|
1909
1915
|
/**
|
|
@@ -1925,17 +1931,17 @@ declare interface GitLabJSONDSL {
|
|
|
1925
1931
|
/**
|
|
1926
1932
|
* Info about the merge request
|
|
1927
1933
|
*/
|
|
1928
|
-
mr:
|
|
1934
|
+
mr: CoreTypes.ExpandedMergeRequestSchema;
|
|
1929
1935
|
|
|
1930
1936
|
/**
|
|
1931
|
-
* All
|
|
1937
|
+
* All the individual commits in the merge request
|
|
1932
1938
|
*/
|
|
1933
|
-
commits:
|
|
1939
|
+
commits: Types.CommitSchema[];
|
|
1934
1940
|
|
|
1935
1941
|
/**
|
|
1936
1942
|
* Merge Request-level MR approvals Configuration
|
|
1937
1943
|
*/
|
|
1938
|
-
approvals:
|
|
1944
|
+
approvals: Types.MergeRequestLevelMergeRequestApprovalSchema;
|
|
1939
1945
|
}
|
|
1940
1946
|
/**
|
|
1941
1947
|
* The GitLab metadata for your MR
|
|
@@ -1948,302 +1954,7 @@ declare type GitLabDSL = {
|
|
|
1948
1954
|
},
|
|
1949
1955
|
api: InstanceType<typeof Gitlab>,
|
|
1950
1956
|
} & GitLabJSONDSL
|
|
1951
|
-
declare interface GitLabUser {
|
|
1952
|
-
id: number;
|
|
1953
|
-
name: string;
|
|
1954
|
-
username: string;
|
|
1955
|
-
state: "active" | "blocked";
|
|
1956
|
-
avatar_url: string | null;
|
|
1957
|
-
web_url: string;
|
|
1958
|
-
}
|
|
1959
|
-
declare type GitLabUserProfile = {
|
|
1960
|
-
created_at: string,
|
|
1961
|
-
bio: string | null,
|
|
1962
|
-
location: string | null,
|
|
1963
|
-
public_email: string,
|
|
1964
|
-
skype: string,
|
|
1965
|
-
linkedin: string,
|
|
1966
|
-
twitter: string,
|
|
1967
|
-
website_url: string,
|
|
1968
|
-
organization: string,
|
|
1969
|
-
last_sign_in_at: string,
|
|
1970
|
-
confirmed_at: string,
|
|
1971
|
-
theme_id: number,
|
|
1972
|
-
last_activity_on: string,
|
|
1973
|
-
color_scheme_id: number,
|
|
1974
|
-
projects_limit: number,
|
|
1975
|
-
current_sign_in_at: string,
|
|
1976
|
-
identities: [
|
|
1977
|
-
{
|
|
1978
|
-
provider: string,
|
|
1979
|
-
extern_uid: string,
|
|
1980
|
-
}
|
|
1981
|
-
],
|
|
1982
|
-
can_create_group: boolean,
|
|
1983
|
-
can_create_project: boolean,
|
|
1984
|
-
two_factor_enabled: boolean,
|
|
1985
|
-
external: boolean,
|
|
1986
|
-
private_profile: boolean,
|
|
1987
|
-
} & GitLabUser
|
|
1988
|
-
declare interface GitLabMRBase {
|
|
1989
|
-
/**
|
|
1990
|
-
* The MR's id
|
|
1991
|
-
*/
|
|
1992
|
-
id: number;
|
|
1993
|
-
|
|
1994
|
-
/**
|
|
1995
|
-
* The unique ID for this MR
|
|
1996
|
-
*/
|
|
1997
|
-
iid: number;
|
|
1998
1957
|
|
|
1999
|
-
/**
|
|
2000
|
-
* The project ID for this MR
|
|
2001
|
-
*/
|
|
2002
|
-
project_id: number;
|
|
2003
|
-
|
|
2004
|
-
/**
|
|
2005
|
-
* The given name of the MR
|
|
2006
|
-
*/
|
|
2007
|
-
title: string;
|
|
2008
|
-
|
|
2009
|
-
/**
|
|
2010
|
-
* The body text describing the MR
|
|
2011
|
-
*/
|
|
2012
|
-
description: string;
|
|
2013
|
-
|
|
2014
|
-
/**
|
|
2015
|
-
* The MR's current availability
|
|
2016
|
-
*/
|
|
2017
|
-
state: "closed" | "open" | "locked" | "merged";
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* When was the MR made
|
|
2021
|
-
*/
|
|
2022
|
-
created_at: string;
|
|
2023
|
-
|
|
2024
|
-
/**
|
|
2025
|
-
* When was the MR updated
|
|
2026
|
-
*/
|
|
2027
|
-
updated_at: string;
|
|
2028
|
-
|
|
2029
|
-
/**
|
|
2030
|
-
* What branch is this MR being merged into
|
|
2031
|
-
*/
|
|
2032
|
-
target_branch: string;
|
|
2033
|
-
|
|
2034
|
-
/**
|
|
2035
|
-
* What branch is this MR come from
|
|
2036
|
-
*/
|
|
2037
|
-
source_branch: string;
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* How many folks have given it an upvote
|
|
2041
|
-
*/
|
|
2042
|
-
upvotes: number;
|
|
2043
|
-
|
|
2044
|
-
/**
|
|
2045
|
-
* How many folks have given it an downvote
|
|
2046
|
-
*/
|
|
2047
|
-
downvotes: number;
|
|
2048
|
-
|
|
2049
|
-
/**
|
|
2050
|
-
* Who made it
|
|
2051
|
-
*/
|
|
2052
|
-
author: GitLabUser;
|
|
2053
|
-
|
|
2054
|
-
/**
|
|
2055
|
-
* Access rights for the user who created the MR
|
|
2056
|
-
*/
|
|
2057
|
-
user: {
|
|
2058
|
-
/**
|
|
2059
|
-
* Does the author have access to merge?
|
|
2060
|
-
*/
|
|
2061
|
-
can_merge: boolean,
|
|
2062
|
-
};
|
|
2063
|
-
|
|
2064
|
-
/**
|
|
2065
|
-
* Who was assigned as the person to review
|
|
2066
|
-
*/
|
|
2067
|
-
assignee?: GitLabUser;
|
|
2068
|
-
assignees: GitLabUser[];
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
* Users who were added as reviewers to the MR
|
|
2072
|
-
*/
|
|
2073
|
-
reviewers: GitLabUser[];
|
|
2074
|
-
source_project_id: number;
|
|
2075
|
-
target_project_id: number;
|
|
2076
|
-
labels: string[];
|
|
2077
|
-
work_in_progress: boolean;
|
|
2078
|
-
milestone: {
|
|
2079
|
-
id: number,
|
|
2080
|
-
iid: number,
|
|
2081
|
-
project_id: number,
|
|
2082
|
-
title: string,
|
|
2083
|
-
description: string,
|
|
2084
|
-
state: "closed" | "active",
|
|
2085
|
-
created_at: string,
|
|
2086
|
-
updated_at: string,
|
|
2087
|
-
due_date: string,
|
|
2088
|
-
start_date: string,
|
|
2089
|
-
web_url: string,
|
|
2090
|
-
};
|
|
2091
|
-
merge_when_pipeline_succeeds: boolean;
|
|
2092
|
-
merge_status: "can_be_merged";
|
|
2093
|
-
merge_error: null | null;
|
|
2094
|
-
sha: string;
|
|
2095
|
-
merge_commit_sha: string | null;
|
|
2096
|
-
user_notes_count: number;
|
|
2097
|
-
discussion_locked: null | null;
|
|
2098
|
-
should_remove_source_branch: boolean;
|
|
2099
|
-
force_remove_source_branch: boolean;
|
|
2100
|
-
allow_collaboration: boolean;
|
|
2101
|
-
allow_maintainer_to_push: boolean;
|
|
2102
|
-
web_url: string;
|
|
2103
|
-
time_stats: {
|
|
2104
|
-
time_estimate: number,
|
|
2105
|
-
total_time_spent: number,
|
|
2106
|
-
human_time_estimate: number | null,
|
|
2107
|
-
human_total_time_spent: number | null,
|
|
2108
|
-
};
|
|
2109
|
-
}
|
|
2110
|
-
/**
|
|
2111
|
-
* TODO: These need more comments from someone who uses GitLab, see GitLabDSL.ts in the danger-js repo
|
|
2112
|
-
*/
|
|
2113
|
-
declare type GitLabMR = {
|
|
2114
|
-
squash: boolean,
|
|
2115
|
-
subscribed: boolean,
|
|
2116
|
-
changes_count: string,
|
|
2117
|
-
merged_by: GitLabUser,
|
|
2118
|
-
merged_at: string,
|
|
2119
|
-
closed_by: GitLabUser | null,
|
|
2120
|
-
closed_at: string | null,
|
|
2121
|
-
latest_build_started_at: string,
|
|
2122
|
-
latest_build_finished_at: string,
|
|
2123
|
-
first_deployed_to_production_at: string | null,
|
|
2124
|
-
pipeline: {
|
|
2125
|
-
id: number,
|
|
2126
|
-
sha: string,
|
|
2127
|
-
ref: string,
|
|
2128
|
-
status: "canceled" | "failed" | "pending" | "running" | "skipped" | "success",
|
|
2129
|
-
web_url: string,
|
|
2130
|
-
},
|
|
2131
|
-
diff_refs: {
|
|
2132
|
-
base_sha: string,
|
|
2133
|
-
head_sha: string,
|
|
2134
|
-
start_sha: string,
|
|
2135
|
-
},
|
|
2136
|
-
diverged_commits_count: number,
|
|
2137
|
-
rebase_in_progress: boolean,
|
|
2138
|
-
approvals_before_merge: null | null,
|
|
2139
|
-
} & GitLabMRBase
|
|
2140
|
-
declare interface GitLabMRChange {
|
|
2141
|
-
old_path: string;
|
|
2142
|
-
new_path: string;
|
|
2143
|
-
a_mode: string;
|
|
2144
|
-
b_mode: string;
|
|
2145
|
-
diff: string;
|
|
2146
|
-
new_file: boolean;
|
|
2147
|
-
renamed_file: boolean;
|
|
2148
|
-
deleted_file: boolean;
|
|
2149
|
-
}
|
|
2150
|
-
declare type GitLabMRChanges = {
|
|
2151
|
-
changes: GitLabMRChange[],
|
|
2152
|
-
} & GitLabMRBase
|
|
2153
|
-
declare interface GitLabNote {
|
|
2154
|
-
id: number;
|
|
2155
|
-
type: "DiffNote" | "DiscussionNote" | null;
|
|
2156
|
-
body: string;
|
|
2157
|
-
attachment: null;
|
|
2158
|
-
author: GitLabUser;
|
|
2159
|
-
created_at: string;
|
|
2160
|
-
updated_at: string;
|
|
2161
|
-
system: boolean;
|
|
2162
|
-
noteable_id: number;
|
|
2163
|
-
noteable_type: "MergeRequest";
|
|
2164
|
-
resolvable: boolean;
|
|
2165
|
-
noteable_iid: number;
|
|
2166
|
-
}
|
|
2167
|
-
declare interface GitLabDiscussion {
|
|
2168
|
-
id: string;
|
|
2169
|
-
individual_note: boolean;
|
|
2170
|
-
notes: GitLabNote[];
|
|
2171
|
-
}
|
|
2172
|
-
declare interface GitLabDiscussionTextPosition {
|
|
2173
|
-
position_type: "text";
|
|
2174
|
-
base_sha: string;
|
|
2175
|
-
start_sha: string;
|
|
2176
|
-
head_sha: string;
|
|
2177
|
-
new_path: string;
|
|
2178
|
-
new_line: number;
|
|
2179
|
-
old_path: string;
|
|
2180
|
-
old_line: number | null;
|
|
2181
|
-
}
|
|
2182
|
-
declare interface GitLabDiscussionCreationOptions {
|
|
2183
|
-
position?: GitLabDiscussionTextPosition;
|
|
2184
|
-
}
|
|
2185
|
-
declare type GitLabInlineNote = {
|
|
2186
|
-
position: {
|
|
2187
|
-
base_sha: string,
|
|
2188
|
-
start_sha: string,
|
|
2189
|
-
head_sha: string,
|
|
2190
|
-
old_path: string,
|
|
2191
|
-
new_path: string,
|
|
2192
|
-
position_type: "text",
|
|
2193
|
-
old_line: number | null,
|
|
2194
|
-
new_line: number,
|
|
2195
|
-
},
|
|
2196
|
-
resolvable: boolean,
|
|
2197
|
-
resolved: boolean,
|
|
2198
|
-
resolved_by: GitLabUser | null,
|
|
2199
|
-
} & GitLabNote
|
|
2200
|
-
declare interface GitLabMRCommit {
|
|
2201
|
-
id: string;
|
|
2202
|
-
short_id: string;
|
|
2203
|
-
created_at: string;
|
|
2204
|
-
parent_ids: string[];
|
|
2205
|
-
title: string;
|
|
2206
|
-
message: string;
|
|
2207
|
-
author_name: string;
|
|
2208
|
-
author_email: string;
|
|
2209
|
-
authored_date: string;
|
|
2210
|
-
committer_name: string;
|
|
2211
|
-
committer_email: string;
|
|
2212
|
-
committed_date: string;
|
|
2213
|
-
}
|
|
2214
|
-
declare interface GitLabCommit {
|
|
2215
|
-
id: string;
|
|
2216
|
-
short_id: string;
|
|
2217
|
-
title: string;
|
|
2218
|
-
author_name: string;
|
|
2219
|
-
author_email: string;
|
|
2220
|
-
created_at: string;
|
|
2221
|
-
}
|
|
2222
|
-
declare interface GitLabRepositoryCompare {
|
|
2223
|
-
commit: GitLabCommit;
|
|
2224
|
-
commits: GitLabCommit[];
|
|
2225
|
-
diffs: GitLabMRChange[];
|
|
2226
|
-
compare_timeout: boolean;
|
|
2227
|
-
compare_same_ref: boolean;
|
|
2228
|
-
}
|
|
2229
|
-
declare interface GitLabApproval {
|
|
2230
|
-
id: number;
|
|
2231
|
-
iid: number;
|
|
2232
|
-
project_id: number;
|
|
2233
|
-
title: string;
|
|
2234
|
-
description: string;
|
|
2235
|
-
state: "closed" | "open" | "locked" | "merged";
|
|
2236
|
-
created_at: string;
|
|
2237
|
-
updated_at: string;
|
|
2238
|
-
merge_status: "can_be_merged";
|
|
2239
|
-
approvals_required: number;
|
|
2240
|
-
approvals_left: number;
|
|
2241
|
-
approved_by?:
|
|
2242
|
-
| {
|
|
2243
|
-
user: GitLabUser,
|
|
2244
|
-
}[]
|
|
2245
|
-
| GitLabUser[];
|
|
2246
|
-
}
|
|
2247
1958
|
/**
|
|
2248
1959
|
* Key details about a repo
|
|
2249
1960
|
*/
|
|
@@ -2344,7 +2055,7 @@ section of code to evaluate across multiple tick cycles.
|
|
|
2344
2055
|
declare export function schedule(asyncFunction: Scheduleable): void
|
|
2345
2056
|
|
|
2346
2057
|
/**
|
|
2347
|
-
*
|
|
2058
|
+
* Highlights critical issues. Message is shown inside a HTML table.
|
|
2348
2059
|
* @param the String to output
|
|
2349
2060
|
* @param a file which this message should be attached to
|
|
2350
2061
|
* @param the line which this message should be attached to
|
|
@@ -2352,8 +2063,7 @@ declare export function schedule(asyncFunction: Scheduleable): void
|
|
|
2352
2063
|
declare export function fail(message: MarkdownString, file?: string, line?: number): void
|
|
2353
2064
|
|
|
2354
2065
|
/**
|
|
2355
|
-
* Highlights low-priority issues
|
|
2356
|
-
* is shown inside a HTML table.
|
|
2066
|
+
* Highlights low-priority issues. Message is shown inside a HTML table.
|
|
2357
2067
|
* @param the String to output
|
|
2358
2068
|
* @param a file which this message should be attached to
|
|
2359
2069
|
* @param the line which this message should be attached to
|
|
@@ -387,8 +387,13 @@ export interface GitHubAPIPR {
|
|
|
387
387
|
owner: string;
|
|
388
388
|
/** The repo name */
|
|
389
389
|
repo: string;
|
|
390
|
-
/**
|
|
390
|
+
/**
|
|
391
|
+
* The PR number
|
|
392
|
+
* @deprecated use `pull_number` instead
|
|
393
|
+
*/
|
|
391
394
|
number: number;
|
|
395
|
+
/** The PR number */
|
|
396
|
+
pull_number: number;
|
|
392
397
|
}
|
|
393
398
|
export interface GitHubReviewers {
|
|
394
399
|
/** Users that have been requested */
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Gitlab } from "@gitbeaker/node";
|
|
1
|
+
import { Gitlab, Types } from "@gitbeaker/node";
|
|
2
2
|
import { RepoMetaData } from "./RepoMetaData";
|
|
3
|
+
import { Types as CoreTypes } from "@gitbeaker/core/dist";
|
|
3
4
|
export interface GitLabJSONDSL {
|
|
4
5
|
/** Info about the repo */
|
|
5
6
|
metadata: RepoMetaData;
|
|
6
7
|
/** Info about the merge request */
|
|
7
|
-
mr:
|
|
8
|
-
/** All
|
|
9
|
-
commits:
|
|
8
|
+
mr: CoreTypes.ExpandedMergeRequestSchema;
|
|
9
|
+
/** All the individual commits in the merge request */
|
|
10
|
+
commits: Types.CommitSchema[];
|
|
10
11
|
/** Merge Request-level MR approvals Configuration */
|
|
11
|
-
approvals:
|
|
12
|
+
approvals: Types.MergeRequestLevelMergeRequestApprovalSchema;
|
|
12
13
|
}
|
|
13
14
|
/** The GitLab metadata for your MR */
|
|
14
15
|
export interface GitLabDSL extends GitLabJSONDSL {
|
|
@@ -19,244 +20,3 @@ export interface GitLabDSL extends GitLabJSONDSL {
|
|
|
19
20
|
};
|
|
20
21
|
api: InstanceType<typeof Gitlab>;
|
|
21
22
|
}
|
|
22
|
-
export interface GitLabUser {
|
|
23
|
-
id: number;
|
|
24
|
-
name: string;
|
|
25
|
-
username: string;
|
|
26
|
-
state: "active" | "blocked";
|
|
27
|
-
avatar_url: string | null;
|
|
28
|
-
web_url: string;
|
|
29
|
-
}
|
|
30
|
-
export interface GitLabUserProfile extends GitLabUser {
|
|
31
|
-
created_at: string;
|
|
32
|
-
bio: string | null;
|
|
33
|
-
location: string | null;
|
|
34
|
-
public_email: string;
|
|
35
|
-
skype: string;
|
|
36
|
-
linkedin: string;
|
|
37
|
-
twitter: string;
|
|
38
|
-
website_url: string;
|
|
39
|
-
organization: string;
|
|
40
|
-
last_sign_in_at: string;
|
|
41
|
-
confirmed_at: string;
|
|
42
|
-
theme_id: number;
|
|
43
|
-
last_activity_on: string;
|
|
44
|
-
color_scheme_id: number;
|
|
45
|
-
projects_limit: number;
|
|
46
|
-
current_sign_in_at: string;
|
|
47
|
-
identities: [{
|
|
48
|
-
provider: string;
|
|
49
|
-
extern_uid: string;
|
|
50
|
-
}];
|
|
51
|
-
can_create_group: boolean;
|
|
52
|
-
can_create_project: boolean;
|
|
53
|
-
two_factor_enabled: boolean;
|
|
54
|
-
external: boolean;
|
|
55
|
-
private_profile: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface GitLabMRBase {
|
|
58
|
-
/** The MR's id */
|
|
59
|
-
id: number;
|
|
60
|
-
/** The unique ID for this MR */
|
|
61
|
-
iid: number;
|
|
62
|
-
/** The project ID for this MR */
|
|
63
|
-
project_id: number;
|
|
64
|
-
/** The given name of the MR */
|
|
65
|
-
title: string;
|
|
66
|
-
/** The body text describing the MR */
|
|
67
|
-
description: string;
|
|
68
|
-
/** The MR's current availability */
|
|
69
|
-
state: "closed" | "open" | "locked" | "merged";
|
|
70
|
-
/** When was the MR made */
|
|
71
|
-
created_at: string;
|
|
72
|
-
/** When was the MR updated */
|
|
73
|
-
updated_at: string;
|
|
74
|
-
/** What branch is this MR being merged into */
|
|
75
|
-
target_branch: string;
|
|
76
|
-
/** What branch is this MR come from */
|
|
77
|
-
source_branch: string;
|
|
78
|
-
/** How many folks have given it an upvote */
|
|
79
|
-
upvotes: number;
|
|
80
|
-
/** How many folks have given it an downvote */
|
|
81
|
-
downvotes: number;
|
|
82
|
-
/** Who made it */
|
|
83
|
-
author: GitLabUser;
|
|
84
|
-
/** Access rights for the user who created the MR */
|
|
85
|
-
user: {
|
|
86
|
-
/** Does the author have access to merge? */
|
|
87
|
-
can_merge: boolean;
|
|
88
|
-
};
|
|
89
|
-
/** Who was assigned as the person to review */
|
|
90
|
-
assignee?: GitLabUser;
|
|
91
|
-
assignees: GitLabUser[];
|
|
92
|
-
/** Users who were added as reviewers to the MR */
|
|
93
|
-
reviewers: GitLabUser[];
|
|
94
|
-
source_project_id: number;
|
|
95
|
-
target_project_id: number;
|
|
96
|
-
labels: string[];
|
|
97
|
-
work_in_progress: boolean;
|
|
98
|
-
milestone: {
|
|
99
|
-
id: number;
|
|
100
|
-
iid: number;
|
|
101
|
-
project_id: number;
|
|
102
|
-
title: string;
|
|
103
|
-
description: string;
|
|
104
|
-
state: "closed" | "active";
|
|
105
|
-
created_at: string;
|
|
106
|
-
updated_at: string;
|
|
107
|
-
due_date: string;
|
|
108
|
-
start_date: string;
|
|
109
|
-
web_url: string;
|
|
110
|
-
};
|
|
111
|
-
merge_when_pipeline_succeeds: boolean;
|
|
112
|
-
merge_status: "can_be_merged";
|
|
113
|
-
merge_error: null | null;
|
|
114
|
-
sha: string;
|
|
115
|
-
merge_commit_sha: string | null;
|
|
116
|
-
user_notes_count: number;
|
|
117
|
-
discussion_locked: null | null;
|
|
118
|
-
should_remove_source_branch: boolean;
|
|
119
|
-
force_remove_source_branch: boolean;
|
|
120
|
-
allow_collaboration: boolean;
|
|
121
|
-
allow_maintainer_to_push: boolean;
|
|
122
|
-
web_url: string;
|
|
123
|
-
time_stats: {
|
|
124
|
-
time_estimate: number;
|
|
125
|
-
total_time_spent: number;
|
|
126
|
-
human_time_estimate: number | null;
|
|
127
|
-
human_total_time_spent: number | null;
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
/** TODO: These need more comments from someone who uses GitLab, see GitLabDSL.ts in the danger-js repo */
|
|
131
|
-
export interface GitLabMR extends GitLabMRBase {
|
|
132
|
-
squash: boolean;
|
|
133
|
-
subscribed: boolean;
|
|
134
|
-
changes_count: string;
|
|
135
|
-
merged_by: GitLabUser;
|
|
136
|
-
merged_at: string;
|
|
137
|
-
closed_by: GitLabUser | null;
|
|
138
|
-
closed_at: string | null;
|
|
139
|
-
latest_build_started_at: string;
|
|
140
|
-
latest_build_finished_at: string;
|
|
141
|
-
first_deployed_to_production_at: string | null;
|
|
142
|
-
pipeline: {
|
|
143
|
-
id: number;
|
|
144
|
-
sha: string;
|
|
145
|
-
ref: string;
|
|
146
|
-
status: "canceled" | "failed" | "pending" | "running" | "skipped" | "success";
|
|
147
|
-
web_url: string;
|
|
148
|
-
};
|
|
149
|
-
diff_refs: {
|
|
150
|
-
base_sha: string;
|
|
151
|
-
head_sha: string;
|
|
152
|
-
start_sha: string;
|
|
153
|
-
};
|
|
154
|
-
diverged_commits_count: number;
|
|
155
|
-
rebase_in_progress: boolean;
|
|
156
|
-
approvals_before_merge: null | null;
|
|
157
|
-
}
|
|
158
|
-
export interface GitLabMRChange {
|
|
159
|
-
old_path: string;
|
|
160
|
-
new_path: string;
|
|
161
|
-
a_mode: string;
|
|
162
|
-
b_mode: string;
|
|
163
|
-
diff: string;
|
|
164
|
-
new_file: boolean;
|
|
165
|
-
renamed_file: boolean;
|
|
166
|
-
deleted_file: boolean;
|
|
167
|
-
}
|
|
168
|
-
export interface GitLabMRChanges extends GitLabMRBase {
|
|
169
|
-
changes: GitLabMRChange[];
|
|
170
|
-
}
|
|
171
|
-
export interface GitLabNote {
|
|
172
|
-
id: number;
|
|
173
|
-
type: "DiffNote" | "DiscussionNote" | null;
|
|
174
|
-
body: string;
|
|
175
|
-
attachment: null;
|
|
176
|
-
author: GitLabUser;
|
|
177
|
-
created_at: string;
|
|
178
|
-
updated_at: string;
|
|
179
|
-
system: boolean;
|
|
180
|
-
noteable_id: number;
|
|
181
|
-
noteable_type: "MergeRequest";
|
|
182
|
-
resolvable: boolean;
|
|
183
|
-
noteable_iid: number;
|
|
184
|
-
}
|
|
185
|
-
export interface GitLabDiscussion {
|
|
186
|
-
id: string;
|
|
187
|
-
individual_note: boolean;
|
|
188
|
-
notes: GitLabNote[];
|
|
189
|
-
}
|
|
190
|
-
export interface GitLabDiscussionTextPosition {
|
|
191
|
-
position_type: "text";
|
|
192
|
-
base_sha: string;
|
|
193
|
-
start_sha: string;
|
|
194
|
-
head_sha: string;
|
|
195
|
-
new_path: string;
|
|
196
|
-
new_line: number;
|
|
197
|
-
old_path: string;
|
|
198
|
-
old_line: number | null;
|
|
199
|
-
}
|
|
200
|
-
export interface GitLabDiscussionCreationOptions {
|
|
201
|
-
position?: GitLabDiscussionTextPosition;
|
|
202
|
-
}
|
|
203
|
-
export interface GitLabInlineNote extends GitLabNote {
|
|
204
|
-
position: {
|
|
205
|
-
base_sha: string;
|
|
206
|
-
start_sha: string;
|
|
207
|
-
head_sha: string;
|
|
208
|
-
old_path: string;
|
|
209
|
-
new_path: string;
|
|
210
|
-
position_type: "text";
|
|
211
|
-
old_line: number | null;
|
|
212
|
-
new_line: number;
|
|
213
|
-
};
|
|
214
|
-
resolvable: boolean;
|
|
215
|
-
resolved: boolean;
|
|
216
|
-
resolved_by: GitLabUser | null;
|
|
217
|
-
}
|
|
218
|
-
export interface GitLabMRCommit {
|
|
219
|
-
id: string;
|
|
220
|
-
short_id: string;
|
|
221
|
-
created_at: string;
|
|
222
|
-
parent_ids: string[];
|
|
223
|
-
title: string;
|
|
224
|
-
message: string;
|
|
225
|
-
author_name: string;
|
|
226
|
-
author_email: string;
|
|
227
|
-
authored_date: string;
|
|
228
|
-
committer_name: string;
|
|
229
|
-
committer_email: string;
|
|
230
|
-
committed_date: string;
|
|
231
|
-
}
|
|
232
|
-
export interface GitLabCommit {
|
|
233
|
-
id: string;
|
|
234
|
-
short_id: string;
|
|
235
|
-
title: string;
|
|
236
|
-
author_name: string;
|
|
237
|
-
author_email: string;
|
|
238
|
-
created_at: string;
|
|
239
|
-
}
|
|
240
|
-
export interface GitLabRepositoryCompare {
|
|
241
|
-
commit: GitLabCommit;
|
|
242
|
-
commits: GitLabCommit[];
|
|
243
|
-
diffs: GitLabMRChange[];
|
|
244
|
-
compare_timeout: boolean;
|
|
245
|
-
compare_same_ref: boolean;
|
|
246
|
-
}
|
|
247
|
-
export interface GitLabApproval {
|
|
248
|
-
id: number;
|
|
249
|
-
iid: number;
|
|
250
|
-
project_id: number;
|
|
251
|
-
title: string;
|
|
252
|
-
description: string;
|
|
253
|
-
state: "closed" | "open" | "locked" | "merged";
|
|
254
|
-
created_at: string;
|
|
255
|
-
updated_at: string;
|
|
256
|
-
merge_status: "can_be_merged";
|
|
257
|
-
approvals_required: number;
|
|
258
|
-
approvals_left: number;
|
|
259
|
-
approved_by?: {
|
|
260
|
-
user: GitLabUser;
|
|
261
|
-
}[] | GitLabUser[];
|
|
262
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHub.js","sourceRoot":"","sources":["../../source/platforms/GitHub.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qEAA8C;AAC9C,iEAAgD;AAKhD,gEAAoE;AACpE,kEAAsE;AAMtE,SAAgB,MAAM,CAAC,GAAc;IAArC,
|
|
1
|
+
{"version":3,"file":"GitHub.js","sourceRoot":"","sources":["../../source/platforms/GitHub.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qEAA8C;AAC9C,iEAAgD;AAKhD,gEAAoE;AACpE,kEAAsE;AAMtE,SAAgB,MAAM,CAAC,GAAc;IAArC,iBAiEC;IAhEC;;OAEG;IACH,IAAM,gBAAgB,GAAG,UAAC,EAAe;QACvC,OAAO;YACL,MAAM,EAAE,EAAE,CAAC,MAAM;YACjB,WAAW,EAAE,EAAE,CAAC,MAAM;YACtB,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACvB,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK;SAChC,CAAA;IACH,CAAC,CAAA;IAED,gEAAgE;IAChE,IAAM,QAAQ,GAAG;;;;wBACD,qBAAM,GAAG,CAAC,QAAQ,EAAE,EAAA;;oBAA5B,KAAK,GAAG,SAAoB;oBAClC,sBAAO,KAAK,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAA;;;SAC/B,CAAA;IAED,OAAO,6BACL,IAAI,EAAE,QAAQ,EAEd,GAAG,KAAA,EACH,aAA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