Created
May 4, 2020 01:45
-
-
Save jgsamudio/77c3e2dd9f5c42dc830d9ad4554fef39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct GitHubPR : Decodable, Equatable { | |
public enum PullRequestState : String, Decodable { | |
case open | |
case closed | |
case merged | |
case locked | |
} | |
/// The number of the pull request. | |
public let number: Int | |
/// The title of the pull request. | |
public let title: String | |
/// The markdown body message of the pull request. | |
public let body: String? | |
/// The user who submitted the pull request. | |
public let user: Danger.GitHubUser | |
/// The user who is assigned to the pull request. | |
public let assignee: Danger.GitHubUser? | |
/// The users who are assigned to the pull request. | |
public let assignees: [Danger.GitHubUser]? | |
/// The ISO8601 date string for when the pull request was created. | |
public let createdAt: Date | |
/// The ISO8601 date string for when the pull request was updated. | |
public let updatedAt: Date | |
/// The ISO8601 date string for when the pull request was closed. | |
public let closedAt: Date? | |
/// The ISO8601 date string for when the pull request was merged. | |
public let mergedAt: Date? | |
/// The merge reference for the _other_ repo. | |
public let head: Danger.GitHubMergeRef | |
/// The merge reference for _this_ repo. | |
public let base: Danger.GitHubMergeRef | |
/// The state for the pull request: open, closed, locked, merged. | |
public let state: Danger.GitHubPR.PullRequestState | |
/// A boolean indicating if the pull request has been locked to contributors only. | |
public let isLocked: Bool | |
/// A boolean indicating if the pull request has been merged. | |
public let isMerged: Bool? | |
/// The number of commits in the pull request. | |
public let commitCount: Int? | |
/// The number of comments in the pull request. | |
public let commentCount: Int? | |
/// The number of review-specific comments in the pull request. | |
public let reviewCommentCount: Int? | |
/// The number of added lines in the pull request. | |
public let additions: Int? | |
/// The number of deleted lines in the pull request. | |
public let deletions: Int? | |
/// The number of files changed in the pull request. | |
public let changedFiles: Int? | |
/// The milestone of the pull request | |
public let milestone: Danger.GitHubMilestone? | |
/// The link back to this PR as user-facing | |
public let htmlUrl: String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment