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.
112 lines
2.8 KiB
112 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"
|
||
|
)
|
||
|
|
||
8 years ago
|
// StateType issue state type
|
||
8 years ago
|
type StateType string
|
||
|
|
||
|
const (
|
||
8 years ago
|
// StateOpen pr is opend
|
||
|
StateOpen StateType = "open"
|
||
|
// StateClosed pr is closed
|
||
|
StateClosed StateType = "closed"
|
||
8 years ago
|
)
|
||
|
|
||
8 years ago
|
// PullRequestMeta PR info if an issue is a PR
|
||
8 years ago
|
type PullRequestMeta struct {
|
||
|
HasMerged bool `json:"merged"`
|
||
|
Merged *time.Time `json:"merged_at"`
|
||
|
}
|
||
|
|
||
7 years ago
|
// Issue represents an issue in a repository
|
||
|
// swagger:model
|
||
8 years ago
|
type Issue 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"`
|
||
7 years ago
|
// Whether the issue is open or closed
|
||
|
//
|
||
|
// type: string
|
||
|
// enum: open,closed
|
||
7 years ago
|
State StateType `json:"state"`
|
||
|
Comments int `json:"comments"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
7 years ago
|
Created time.Time `json:"created_at"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
7 years ago
|
Updated time.Time `json:"updated_at"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
|
Closed *time.Time `json:"closed_at"`
|
||
|
// swagger:strfmt date-time
|
||
|
Deadline *time.Time `json:"due_date"`
|
||
8 years ago
|
|
||
|
PullRequest *PullRequestMeta `json:"pull_request"`
|
||
|
}
|
||
|
|
||
8 years ago
|
// ListIssueOption list issue options
|
||
8 years ago
|
type ListIssueOption struct {
|
||
8 years ago
|
Page int
|
||
|
State string
|
||
8 years ago
|
}
|
||
|
|
||
8 years ago
|
// CreateIssueOption options to create one issue
|
||
8 years ago
|
type CreateIssueOption struct {
|
||
7 years ago
|
// required:true
|
||
7 years ago
|
Title string `json:"title" binding:"Required"`
|
||
|
Body string `json:"body"`
|
||
7 years ago
|
// username of assignee
|
||
7 years ago
|
Assignee string `json:"assignee"`
|
||
|
Assignees []string `json:"assignees"`
|
||
|
// swagger:strfmt date-time
|
||
|
Deadline *time.Time `json:"due_date"`
|
||
7 years ago
|
// milestone id
|
||
7 years ago
|
Milestone int64 `json:"milestone"`
|
||
7 years ago
|
// list of label ids
|
||
7 years ago
|
Labels []int64 `json:"labels"`
|
||
|
Closed bool `json:"closed"`
|
||
8 years ago
|
}
|
||
|
|
||
7 years ago
|
// EditIssueOption options for editing an issue
|
||
8 years ago
|
type EditIssueOption struct {
|
||
7 years ago
|
Title string `json:"title"`
|
||
|
Body *string `json:"body"`
|
||
|
Assignee *string `json:"assignee"`
|
||
|
Assignees []string `json:"assignees"`
|
||
|
Milestone *int64 `json:"milestone"`
|
||
|
State *string `json:"state"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
7 years ago
|
Deadline *time.Time `json:"due_date"`
|
||
8 years ago
|
}
|
||
|
|
||
7 years ago
|
// EditDeadlineOption options for creating a deadline
|
||
|
type EditDeadlineOption struct {
|
||
|
// required:true
|
||
|
// swagger:strfmt date-time
|
||
|
Deadline *time.Time `json:"due_date"`
|
||
|
}
|
||
|
|
||
|
// IssueDeadline represents an issue deadline
|
||
|
// swagger:model
|
||
|
type IssueDeadline struct {
|
||
|
// swagger:strfmt date-time
|
||
|
Deadline *time.Time `json:"due_date"`
|
||
|
}
|
||
6 years ago
|
|
||
|
// EditPriorityOption options for updating priority
|
||
|
type EditPriorityOption struct {
|
||
|
// required:true
|
||
|
Priority int `json:"priority"`
|
||
|
}
|