mirror of https://github.com/go-gitea/gitea
Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.8 KiB
93 lines
2.8 KiB
8 years ago
|
// Copyright 2016 The Gogs Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
6 years ago
|
package structs
|
||
8 years ago
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
7 years ago
|
// PullRequest represents a pull request
|
||
8 years ago
|
type PullRequest struct {
|
||
|
ID int64 `json:"id"`
|
||
8 years ago
|
URL string `json:"url"`
|
||
8 years ago
|
Index int64 `json:"number"`
|
||
|
Poster *User `json:"user"`
|
||
|
Title string `json:"title"`
|
||
|
Body string `json:"body"`
|
||
|
Labels []*Label `json:"labels"`
|
||
|
Milestone *Milestone `json:"milestone"`
|
||
|
Assignee *User `json:"assignee"`
|
||
7 years ago
|
Assignees []*User `json:"assignees"`
|
||
8 years ago
|
State StateType `json:"state"`
|
||
|
Comments int `json:"comments"`
|
||
|
|
||
8 years ago
|
HTMLURL string `json:"html_url"`
|
||
|
DiffURL string `json:"diff_url"`
|
||
|
PatchURL string `json:"patch_url"`
|
||
8 years ago
|
|
||
7 years ago
|
Mergeable bool `json:"mergeable"`
|
||
|
HasMerged bool `json:"merged"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
8 years ago
|
Merged *time.Time `json:"merged_at"`
|
||
|
MergedCommitID *string `json:"merge_commit_sha"`
|
||
|
MergedBy *User `json:"merged_by"`
|
||
8 years ago
|
|
||
|
Base *PRBranchInfo `json:"base"`
|
||
|
Head *PRBranchInfo `json:"head"`
|
||
|
MergeBase string `json:"merge_base"`
|
||
8 years ago
|
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
|
Deadline *time.Time `json:"due_date"`
|
||
|
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
8 years ago
|
Created *time.Time `json:"created_at"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
8 years ago
|
Updated *time.Time `json:"updated_at"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
|
Closed *time.Time `json:"closed_at"`
|
||
8 years ago
|
}
|
||
|
|
||
7 years ago
|
// PRBranchInfo information about a branch
|
||
8 years ago
|
type PRBranchInfo struct {
|
||
|
Name string `json:"label"`
|
||
|
Ref string `json:"ref"`
|
||
|
Sha string `json:"sha"`
|
||
|
RepoID int64 `json:"repo_id"`
|
||
|
Repository *Repository `json:"repo"`
|
||
|
}
|
||
|
|
||
7 years ago
|
// ListPullRequestsOptions options for listing pull requests
|
||
8 years ago
|
type ListPullRequestsOptions struct {
|
||
|
Page int `json:"page"`
|
||
|
State string `json:"state"`
|
||
|
}
|
||
|
|
||
|
// CreatePullRequestOption options when creating a pull request
|
||
|
type CreatePullRequestOption struct {
|
||
7 years ago
|
Head string `json:"head" binding:"Required"`
|
||
|
Base string `json:"base" binding:"Required"`
|
||
|
Title string `json:"title" binding:"Required"`
|
||
|
Body string `json:"body"`
|
||
|
Assignee string `json:"assignee"`
|
||
|
Assignees []string `json:"assignees"`
|
||
|
Milestone int64 `json:"milestone"`
|
||
|
Labels []int64 `json:"labels"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
7 years ago
|
Deadline *time.Time `json:"due_date"`
|
||
8 years ago
|
}
|
||
|
|
||
|
// EditPullRequestOption options when modify pull request
|
||
|
type EditPullRequestOption struct {
|
||
7 years ago
|
Title string `json:"title"`
|
||
|
Body string `json:"body"`
|
||
|
Assignee string `json:"assignee"`
|
||
|
Assignees []string `json:"assignees"`
|
||
|
Milestone int64 `json:"milestone"`
|
||
|
Labels []int64 `json:"labels"`
|
||
|
State *string `json:"state"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
7 years ago
|
Deadline *time.Time `json:"due_date"`
|
||
8 years ago
|
}
|