danger 11.2.7 → 11.3.0
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 +9 -0
- package/distribution/commands/utils/reporting.js +1 -1
- package/distribution/commands/utils/reporting.js.map +1 -1
- package/distribution/commands/utils/runDangerSubprocess.js +3 -2
- package/distribution/commands/utils/runDangerSubprocess.js.map +1 -1
- package/distribution/danger.d.ts +6 -273
- package/distribution/danger.js.flow +4 -299
- package/distribution/dsl/GitLabDSL.d.ts +6 -246
- package/distribution/platforms/GitLab.d.ts +11 -10
- package/distribution/platforms/GitLab.js +35 -28
- 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/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/templates/githubIssueTemplate.js +1 -1
- package/distribution/runner/templates/githubIssueTemplate.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
<!-- Your comment below this -->
|
|
18
18
|
<!-- Your comment above this -->
|
|
19
19
|
|
|
20
|
+
## 11.3.0
|
|
21
|
+
|
|
22
|
+
- GitLab: Upgrade `@gitbeaker/node` from `^21.3.0` to `^35.8.1` [@buffcode]
|
|
23
|
+
|
|
24
|
+
## 11.2.8
|
|
25
|
+
|
|
26
|
+
- Another fix for Gitlab inline comments #1395 [@glensc]
|
|
27
|
+
|
|
20
28
|
## 11.2.7
|
|
21
29
|
|
|
22
30
|
- Fix issue where GitLab inline comments would not show on merge requests #1351 - [@davidbrunow]
|
|
@@ -1959,6 +1967,7 @@ Not usable for others, only stubs of classes etc. - [@orta]
|
|
|
1959
1967
|
[@azz]: https://github.com/azz
|
|
1960
1968
|
[@bdotdub]: https://github.com/bdotdub
|
|
1961
1969
|
[@bigkraig]: https://github.com/bigkraig
|
|
1970
|
+
[@buffcode]: https://github.com/buffcode
|
|
1962
1971
|
[@caffodian]: https://github.com/caffodian
|
|
1963
1972
|
[@codestergit]: https://github.com/codestergit
|
|
1964
1973
|
[@cwright017]: https://github.com/Cwright017
|
|
@@ -10,7 +10,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.mergeResults = exports.resultsWithFailure = exports.markdownCode = void 0;
|
|
13
|
-
var markdownCode = function (string) { return "\n
|
|
13
|
+
var markdownCode = function (string) { return "\n```\n".concat(string, "\n```\n"); };
|
|
14
14
|
exports.markdownCode = markdownCode;
|
|
15
15
|
var resultsWithFailure = function (failure, moreMarkdown) {
|
|
16
16
|
var fail = { message: failure };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporting.js","sourceRoot":"","sources":["../../../source/commands/utils/reporting.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEO,IAAM,YAAY,GAAG,UAAC,MAAc,IAAa,OAAA,
|
|
1
|
+
{"version":3,"file":"reporting.js","sourceRoot":"","sources":["../../../source/commands/utils/reporting.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEO,IAAM,YAAY,GAAG,UAAC,MAAc,IAAa,OAAA,iBAEtD,MAAM,YAEP,EAJuD,CAIvD,CAAA;AAJY,QAAA,YAAY,gBAIxB;AACM,IAAM,kBAAkB,GAAG,UAAC,OAAe,EAAE,YAAqB;IACvE,IAAM,IAAI,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;IACjC,OAAO;QACL,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,CAAC,IAAI,CAAC;QACb,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;KAC3D,CAAA;AACH,CAAC,CAAA;AARY,QAAA,kBAAkB,sBAQ9B;AAEM,IAAM,YAAY,GAAG,UAAC,IAAmB,EAAE,KAAoB;IACpE,OAAO;QACL,QAAQ,kCAAM,IAAI,CAAC,QAAQ,SAAK,KAAK,CAAC,QAAQ,OAAC;QAC/C,QAAQ,kCAAM,IAAI,CAAC,QAAQ,SAAK,KAAK,CAAC,QAAQ,OAAC;QAC/C,KAAK,kCAAM,IAAI,CAAC,KAAK,SAAK,KAAK,CAAC,KAAK,OAAC;QACtC,SAAS,kCAAM,IAAI,CAAC,SAAS,SAAK,KAAK,CAAC,SAAS,OAAC;KACnD,CAAA;AACH,CAAC,CAAA;AAPY,QAAA,YAAY,gBAOxB"}
|
|
@@ -151,7 +151,7 @@ var runDangerSubprocess = function (subprocessName, dslJSON, exec, config) {
|
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
child.on("close", function (code) { return __awaiter(void 0, void 0, void 0, function () {
|
|
154
|
-
var failResults, danger;
|
|
154
|
+
var moreMarkdown, failResults, danger;
|
|
155
155
|
return __generator(this, function (_a) {
|
|
156
156
|
switch (_a.label) {
|
|
157
157
|
case 0:
|
|
@@ -160,7 +160,8 @@ var runDangerSubprocess = function (subprocessName, dslJSON, exec, config) {
|
|
|
160
160
|
if (code) {
|
|
161
161
|
d("Handling fail from subprocess");
|
|
162
162
|
process.exitCode = code;
|
|
163
|
-
|
|
163
|
+
moreMarkdown = "### Log\n\n<details>\n\n" + (0, reporting_1.markdownCode)(allLogs) + "\n\n</details>\n";
|
|
164
|
+
failResults = (0, reporting_1.resultsWithFailure)("`".concat(processDisplayName, "` failed."), moreMarkdown);
|
|
164
165
|
if (results) {
|
|
165
166
|
results = (0, reporting_1.mergeResults)(results, failResults);
|
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AC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAA;AAED,wEAAwE;AACxE,IAAM,iBAAiB,GAAG,UAAC,MAAc;IACvC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAChC,OAAO,KAAK,CAAC,IAAI,CAAC,UAAC,IAAI;QACrB,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;QAC3B,OAAO,CACL,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;YACvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;YACrB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAC7B,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,kBAAe,2BAAmB,CAAA"}
|
package/distribution/danger.d.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Octokit as GitHub } from "@octokit/rest"
|
|
6
|
-
import { Gitlab } from "@gitbeaker/node"
|
|
6
|
+
import { Gitlab, Types } from "@gitbeaker/node"
|
|
7
|
+
import { Types as CoreTypes } from "@gitbeaker/core/dist"
|
|
7
8
|
import { File } from "parse-diff"
|
|
8
9
|
|
|
9
10
|
type MarkdownString = string
|
|
@@ -1475,11 +1476,11 @@ interface GitLabJSONDSL {
|
|
|
1475
1476
|
/** Info about the repo */
|
|
1476
1477
|
metadata: RepoMetaData
|
|
1477
1478
|
/** Info about the merge request */
|
|
1478
|
-
mr:
|
|
1479
|
-
/** All
|
|
1480
|
-
commits:
|
|
1479
|
+
mr: CoreTypes.ExpandedMergeRequestSchema
|
|
1480
|
+
/** All the individual commits in the merge request */
|
|
1481
|
+
commits: Types.CommitSchema[]
|
|
1481
1482
|
/** Merge Request-level MR approvals Configuration */
|
|
1482
|
-
approvals:
|
|
1483
|
+
approvals: Types.MergeRequestLevelMergeRequestApprovalSchema
|
|
1483
1484
|
}
|
|
1484
1485
|
|
|
1485
1486
|
// danger.gitlab
|
|
@@ -1493,274 +1494,6 @@ interface GitLabDSL extends GitLabJSONDSL {
|
|
|
1493
1494
|
api: InstanceType<typeof Gitlab>
|
|
1494
1495
|
}
|
|
1495
1496
|
|
|
1496
|
-
// ---
|
|
1497
|
-
// JSON responses from API
|
|
1498
|
-
|
|
1499
|
-
interface GitLabUser {
|
|
1500
|
-
id: number
|
|
1501
|
-
name: string
|
|
1502
|
-
username: string
|
|
1503
|
-
state: "active" | "blocked"
|
|
1504
|
-
avatar_url: string | null
|
|
1505
|
-
web_url: string
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
interface GitLabUserProfile extends GitLabUser {
|
|
1509
|
-
created_at: string
|
|
1510
|
-
bio: string | null
|
|
1511
|
-
location: string | null
|
|
1512
|
-
public_email: string
|
|
1513
|
-
skype: string
|
|
1514
|
-
linkedin: string
|
|
1515
|
-
twitter: string
|
|
1516
|
-
website_url: string
|
|
1517
|
-
organization: string
|
|
1518
|
-
last_sign_in_at: string
|
|
1519
|
-
confirmed_at: string
|
|
1520
|
-
theme_id: number
|
|
1521
|
-
last_activity_on: string
|
|
1522
|
-
color_scheme_id: number
|
|
1523
|
-
projects_limit: number
|
|
1524
|
-
current_sign_in_at: string
|
|
1525
|
-
identities: [{ provider: string; extern_uid: string }]
|
|
1526
|
-
can_create_group: boolean
|
|
1527
|
-
can_create_project: boolean
|
|
1528
|
-
two_factor_enabled: boolean
|
|
1529
|
-
external: boolean
|
|
1530
|
-
private_profile: boolean
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
interface GitLabMRBase {
|
|
1534
|
-
/** The MR's id */
|
|
1535
|
-
id: number
|
|
1536
|
-
|
|
1537
|
-
/** The unique ID for this MR */
|
|
1538
|
-
iid: number
|
|
1539
|
-
|
|
1540
|
-
/** The project ID for this MR */
|
|
1541
|
-
project_id: number
|
|
1542
|
-
|
|
1543
|
-
/** The given name of the MR */
|
|
1544
|
-
title: string
|
|
1545
|
-
|
|
1546
|
-
/** The body text describing the MR */
|
|
1547
|
-
description: string
|
|
1548
|
-
|
|
1549
|
-
/** The MR's current availability */
|
|
1550
|
-
state: "closed" | "open" | "locked" | "merged"
|
|
1551
|
-
|
|
1552
|
-
/** When was the MR made */
|
|
1553
|
-
created_at: string
|
|
1554
|
-
|
|
1555
|
-
/** When was the MR updated */
|
|
1556
|
-
updated_at: string
|
|
1557
|
-
|
|
1558
|
-
/** What branch is this MR being merged into */
|
|
1559
|
-
target_branch: string
|
|
1560
|
-
/** What branch is this MR come from */
|
|
1561
|
-
source_branch: string
|
|
1562
|
-
|
|
1563
|
-
/** How many folks have given it an upvote */
|
|
1564
|
-
upvotes: number
|
|
1565
|
-
/** How many folks have given it an downvote */
|
|
1566
|
-
downvotes: number
|
|
1567
|
-
|
|
1568
|
-
/** Who made it */
|
|
1569
|
-
author: GitLabUser
|
|
1570
|
-
/** Access rights for the user who created the MR */
|
|
1571
|
-
user: {
|
|
1572
|
-
/** Does the author have access to merge? */
|
|
1573
|
-
can_merge: boolean
|
|
1574
|
-
}
|
|
1575
|
-
/** Who was assigned as the person to review */
|
|
1576
|
-
assignee?: GitLabUser
|
|
1577
|
-
assignees: GitLabUser[]
|
|
1578
|
-
/** Users who were added as reviewers to the MR */
|
|
1579
|
-
reviewers: GitLabUser[]
|
|
1580
|
-
source_project_id: number
|
|
1581
|
-
target_project_id: number
|
|
1582
|
-
labels: string[]
|
|
1583
|
-
work_in_progress: boolean
|
|
1584
|
-
milestone: {
|
|
1585
|
-
id: number
|
|
1586
|
-
iid: number
|
|
1587
|
-
project_id: number
|
|
1588
|
-
title: string
|
|
1589
|
-
description: string
|
|
1590
|
-
state: "closed" | "active"
|
|
1591
|
-
created_at: string
|
|
1592
|
-
updated_at: string
|
|
1593
|
-
due_date: string
|
|
1594
|
-
start_date: string
|
|
1595
|
-
web_url: string
|
|
1596
|
-
}
|
|
1597
|
-
merge_when_pipeline_succeeds: boolean
|
|
1598
|
-
merge_status: "can_be_merged" // XXX: other statuses?
|
|
1599
|
-
merge_error: null | null
|
|
1600
|
-
sha: string
|
|
1601
|
-
merge_commit_sha: string | null
|
|
1602
|
-
user_notes_count: number
|
|
1603
|
-
discussion_locked: null | null
|
|
1604
|
-
should_remove_source_branch: boolean
|
|
1605
|
-
force_remove_source_branch: boolean
|
|
1606
|
-
allow_collaboration: boolean
|
|
1607
|
-
allow_maintainer_to_push: boolean
|
|
1608
|
-
web_url: string
|
|
1609
|
-
time_stats: {
|
|
1610
|
-
time_estimate: number
|
|
1611
|
-
total_time_spent: number
|
|
1612
|
-
human_time_estimate: number | null
|
|
1613
|
-
human_total_time_spent: number | null
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
/** TODO: These need more comments from someone who uses GitLab, see GitLabDSL.ts in the danger-js repo */
|
|
1618
|
-
interface GitLabMR extends GitLabMRBase {
|
|
1619
|
-
squash: boolean
|
|
1620
|
-
subscribed: boolean
|
|
1621
|
-
changes_count: string
|
|
1622
|
-
merged_by: GitLabUser
|
|
1623
|
-
merged_at: string
|
|
1624
|
-
closed_by: GitLabUser | null
|
|
1625
|
-
closed_at: string | null
|
|
1626
|
-
latest_build_started_at: string
|
|
1627
|
-
latest_build_finished_at: string
|
|
1628
|
-
first_deployed_to_production_at: string | null
|
|
1629
|
-
pipeline: {
|
|
1630
|
-
id: number
|
|
1631
|
-
sha: string
|
|
1632
|
-
ref: string
|
|
1633
|
-
status: "canceled" | "failed" | "pending" | "running" | "skipped" | "success"
|
|
1634
|
-
web_url: string
|
|
1635
|
-
}
|
|
1636
|
-
diff_refs: {
|
|
1637
|
-
base_sha: string
|
|
1638
|
-
head_sha: string
|
|
1639
|
-
start_sha: string
|
|
1640
|
-
}
|
|
1641
|
-
diverged_commits_count: number
|
|
1642
|
-
rebase_in_progress: boolean
|
|
1643
|
-
approvals_before_merge: null | null
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
interface GitLabMRChange {
|
|
1647
|
-
old_path: string
|
|
1648
|
-
new_path: string
|
|
1649
|
-
a_mode: string
|
|
1650
|
-
b_mode: string
|
|
1651
|
-
diff: string
|
|
1652
|
-
new_file: boolean
|
|
1653
|
-
renamed_file: boolean
|
|
1654
|
-
deleted_file: boolean
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
interface GitLabMRChanges extends GitLabMRBase {
|
|
1658
|
-
changes: GitLabMRChange[]
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
interface GitLabNote {
|
|
1662
|
-
id: number
|
|
1663
|
-
type: "DiffNote" | "DiscussionNote" | null // XXX: other types? null means "normal comment"
|
|
1664
|
-
body: string
|
|
1665
|
-
attachment: null // XXX: what can an attachment be?
|
|
1666
|
-
author: GitLabUser
|
|
1667
|
-
created_at: string
|
|
1668
|
-
updated_at: string
|
|
1669
|
-
system: boolean
|
|
1670
|
-
noteable_id: number
|
|
1671
|
-
noteable_type: "MergeRequest" // XXX: other types...?
|
|
1672
|
-
resolvable: boolean
|
|
1673
|
-
noteable_iid: number
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
interface GitLabDiscussion {
|
|
1677
|
-
id: string //40 character hex
|
|
1678
|
-
individual_note: boolean
|
|
1679
|
-
notes: GitLabNote[]
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
interface GitLabDiscussionTextPosition {
|
|
1683
|
-
position_type: "text"
|
|
1684
|
-
base_sha: string
|
|
1685
|
-
start_sha: string
|
|
1686
|
-
head_sha: string
|
|
1687
|
-
new_path: string
|
|
1688
|
-
new_line: number
|
|
1689
|
-
old_path: string
|
|
1690
|
-
old_line: number | null
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
interface GitLabDiscussionCreationOptions {
|
|
1694
|
-
position?: GitLabDiscussionTextPosition
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
interface GitLabInlineNote extends GitLabNote {
|
|
1698
|
-
position: {
|
|
1699
|
-
base_sha: string
|
|
1700
|
-
start_sha: string
|
|
1701
|
-
head_sha: string
|
|
1702
|
-
old_path: string
|
|
1703
|
-
new_path: string
|
|
1704
|
-
position_type: "text" // XXX: other types?
|
|
1705
|
-
old_line: number | null
|
|
1706
|
-
new_line: number
|
|
1707
|
-
}
|
|
1708
|
-
resolvable: boolean
|
|
1709
|
-
resolved: boolean
|
|
1710
|
-
resolved_by: GitLabUser | null
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
interface GitLabMRCommit {
|
|
1714
|
-
id: string
|
|
1715
|
-
short_id: string
|
|
1716
|
-
created_at: string
|
|
1717
|
-
parent_ids: string[]
|
|
1718
|
-
title: string
|
|
1719
|
-
message: string
|
|
1720
|
-
author_name: string
|
|
1721
|
-
author_email: string
|
|
1722
|
-
authored_date: string
|
|
1723
|
-
committer_name: string
|
|
1724
|
-
committer_email: string
|
|
1725
|
-
committed_date: string
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
interface GitLabCommit {
|
|
1729
|
-
id: string
|
|
1730
|
-
short_id: string
|
|
1731
|
-
title: string
|
|
1732
|
-
author_name: string
|
|
1733
|
-
author_email: string
|
|
1734
|
-
created_at: string
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
interface GitLabRepositoryCompare {
|
|
1738
|
-
commit: GitLabCommit
|
|
1739
|
-
commits: GitLabCommit[]
|
|
1740
|
-
diffs: GitLabMRChange[]
|
|
1741
|
-
compare_timeout: boolean
|
|
1742
|
-
compare_same_ref: boolean
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
interface GitLabApproval {
|
|
1746
|
-
id: number
|
|
1747
|
-
iid: number
|
|
1748
|
-
project_id: number
|
|
1749
|
-
title: string
|
|
1750
|
-
description: string
|
|
1751
|
-
state: "closed" | "open" | "locked" | "merged"
|
|
1752
|
-
created_at: string
|
|
1753
|
-
updated_at: string
|
|
1754
|
-
merge_status: "can_be_merged"
|
|
1755
|
-
approvals_required: number
|
|
1756
|
-
approvals_left: number
|
|
1757
|
-
approved_by?:
|
|
1758
|
-
| {
|
|
1759
|
-
user: GitLabUser
|
|
1760
|
-
}[]
|
|
1761
|
-
| GitLabUser[]
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
1497
|
/** Key details about a repo */
|
|
1765
1498
|
interface RepoMetaData {
|
|
1766
1499
|
/** A path like "artsy/eigen" */
|
|
@@ -1925,17 +1925,17 @@ declare interface GitLabJSONDSL {
|
|
|
1925
1925
|
/**
|
|
1926
1926
|
* Info about the merge request
|
|
1927
1927
|
*/
|
|
1928
|
-
mr:
|
|
1928
|
+
mr: CoreTypes.ExpandedMergeRequestSchema;
|
|
1929
1929
|
|
|
1930
1930
|
/**
|
|
1931
|
-
* All
|
|
1931
|
+
* All the individual commits in the merge request
|
|
1932
1932
|
*/
|
|
1933
|
-
commits:
|
|
1933
|
+
commits: Types.CommitSchema[];
|
|
1934
1934
|
|
|
1935
1935
|
/**
|
|
1936
1936
|
* Merge Request-level MR approvals Configuration
|
|
1937
1937
|
*/
|
|
1938
|
-
approvals:
|
|
1938
|
+
approvals: Types.MergeRequestLevelMergeRequestApprovalSchema;
|
|
1939
1939
|
}
|
|
1940
1940
|
/**
|
|
1941
1941
|
* The GitLab metadata for your MR
|
|
@@ -1948,302 +1948,7 @@ declare type GitLabDSL = {
|
|
|
1948
1948
|
},
|
|
1949
1949
|
api: InstanceType<typeof Gitlab>,
|
|
1950
1950
|
} & 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
|
-
|
|
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
1951
|
|
|
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
1952
|
/**
|
|
2248
1953
|
* Key details about a repo
|
|
2249
1954
|
*/
|