Skip to content

Commit

Permalink
Release 10.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Aug 19, 2020
1 parent 779938f commit 1a3df66
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "danger",
"version": "10.3.0",
"version": "10.3.1",
"description": "Unit tests for Team Culture",
"main": "distribution/danger.js",
"typings": "distribution/danger.d.ts",
Expand Down
29 changes: 25 additions & 4 deletions source/danger-incoming-process-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1576,18 +1576,22 @@
"type": "object"
},
"GitLabDSL": {
"description": "The GitLab metadata for your MR",
"properties": {
"commits": {
"description": "All of the individual commits in the merge request",
"items": {
"$ref": "#/definitions/GitLabMRCommit"
},
"type": "array"
},
"metadata": {
"$ref": "#/definitions/RepoMetaData"
"$ref": "#/definitions/RepoMetaData",
"description": "Info about the repo"
},
"mr": {
"$ref": "#/definitions/GitLabMR"
"$ref": "#/definitions/GitLabMR",
"description": "Info about the merge request"
},
"utils": {
"type": "object"
Expand All @@ -1596,6 +1600,7 @@
"type": "object"
},
"GitLabMR": {
"description": "TODO: These need more comments from someone who uses GitLab, see GitLabDSL.ts in the danger-js repo",
"properties": {
"allow_collaboration": {
"type": "boolean"
Expand All @@ -1607,10 +1612,12 @@
"type": "null"
},
"assignee": {
"$ref": "#/definitions/GitLabUser"
"$ref": "#/definitions/GitLabUser",
"description": "Who was assigned as the person to review"
},
"author": {
"$ref": "#/definitions/GitLabUser"
"$ref": "#/definitions/GitLabUser",
"description": "Who made it"
},
"changes_count": {
"type": "string"
Expand All @@ -1632,9 +1639,11 @@
]
},
"created_at": {
"description": "When was the MR made",
"type": "string"
},
"description": {
"description": "The body text describing the MR",
"type": "string"
},
"diff_refs": {
Expand All @@ -1658,6 +1667,7 @@
"type": "number"
},
"downvotes": {
"description": "How many folks have given it an downvote",
"type": "number"
},
"first_deployed_to_production_at": {
Expand All @@ -1670,9 +1680,11 @@
"type": "boolean"
},
"id": {
"description": "The MR's id",
"type": "number"
},
"iid": {
"description": "The unique ID for this MR",
"type": "number"
},
"labels": {
Expand Down Expand Up @@ -1782,6 +1794,7 @@
"type": "object"
},
"project_id": {
"description": "The project ID for this MR",
"type": "number"
},
"rebase_in_progress": {
Expand All @@ -1794,6 +1807,7 @@
"type": "boolean"
},
"source_branch": {
"description": "What branch is this MR come from",
"type": "string"
},
"source_project_id": {
Expand All @@ -1803,6 +1817,7 @@
"type": "boolean"
},
"state": {
"description": "The MR's current availability",
"enum": [
"closed",
"locked",
Expand All @@ -1815,6 +1830,7 @@
"type": "boolean"
},
"target_branch": {
"description": "What branch is this MR being merged into",
"type": "string"
},
"target_project_id": {
Expand Down Expand Up @@ -1844,17 +1860,22 @@
"type": "object"
},
"title": {
"description": "The given name of the MR",
"type": "string"
},
"updated_at": {
"description": "When was the MR updated",
"type": "string"
},
"upvotes": {
"description": "How many folks have given it an upvote",
"type": "number"
},
"user": {
"description": "Access rights for the user who created the MR",
"properties": {
"can_merge": {
"description": "Does the author have access to merge?",
"type": "boolean"
}
},
Expand Down
32 changes: 23 additions & 9 deletions source/danger.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1427,12 +1427,16 @@ interface GitHubReviewers {

// getPlatformReviewDSLRepresentation
interface GitLabJSONDSL {
/** Info about the repo */
metadata: RepoMetaData
/** Info about the merge request */
mr: GitLabMR
/** All of the individual commits in the merge request */
commits: GitLabMRCommit[]
}

// danger.gitlab
/** The GitLab metadata for your MR */
interface GitLabDSL extends GitLabJSONDSL {
utils: {
fileContents(path: string, repoSlug?: string, ref?: string): Promise<string>
Expand Down Expand Up @@ -1477,40 +1481,49 @@ interface GitLabUserProfile extends GitLabUser {
}

interface GitLabMRBase {
/** */
/** The MR's id */
id: number

/** */
/** The unique ID for this MR */
iid: number

/** */
/** The project ID for this MR */
project_id: number

/** */
/** The given name of the MR */
title: string

/** */
/** The body text describing the MR */
description: string

/** */
/** The MR's current availability */
state: "closed" | "open" | "locked" | "merged"

/** */
/** When was the MR made */
created_at: string

/** */
/** When was the MR updated */
updated_at: string

/** What branch is this MR being merged into */
target_branch: string
/** What branch is this MR come from */
source_branch: string

/** How many folks have given it an upvote */
upvotes: number
/** How many folks have given it an downvote */
downvotes: number

/** Who made it */
author: GitLabUser
/** Access rights for the user who created the MR */
user: {
/** Does the author have access to merge? */
can_merge: boolean
}
assignee: GitLabUser
/** Who was assigned as the person to review */
assignee?: GitLabUser
source_project_id: number
target_project_id: number
labels: string[]
Expand Down Expand Up @@ -1548,6 +1561,7 @@ interface GitLabMRBase {
}
}

/** TODO: These need more comments from someone who uses GitLab, see GitLabDSL.ts in the danger-js repo */
interface GitLabMR extends GitLabMRBase {
squash: boolean
subscribed: boolean
Expand Down

0 comments on commit 1a3df66

Please sign in to comment.