summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/repository.go3
-rw-r--r--modules/structs/issue.go2
-rw-r--r--modules/structs/pull.go2
-rw-r--r--modules/structs/repo.go6
4 files changed, 13 insertions, 0 deletions
diff --git a/modules/setting/repository.go b/modules/setting/repository.go
index 5520c992b9..406068b59d 100644
--- a/modules/setting/repository.go
+++ b/modules/setting/repository.go
@@ -90,6 +90,7 @@ var (
// Issue Setting
Issue struct {
LockReasons []string
+ MaxPinned int
} `ini:"repository.issue"`
Release struct {
@@ -227,8 +228,10 @@ var (
// Issue settings
Issue: struct {
LockReasons []string
+ MaxPinned int
}{
LockReasons: strings.Split("Too heated,Off-topic,Spam,Resolved", ","),
+ MaxPinned: 3,
},
Release: struct {
diff --git a/modules/structs/issue.go b/modules/structs/issue.go
index 04e169df84..a9fb6c6e79 100644
--- a/modules/structs/issue.go
+++ b/modules/structs/issue.go
@@ -75,6 +75,8 @@ type Issue struct {
PullRequest *PullRequestMeta `json:"pull_request"`
Repo *RepositoryMeta `json:"repository"`
+
+ PinOrder int `json:"pin_order"`
}
// CreateIssueOption options to create one issue
diff --git a/modules/structs/pull.go b/modules/structs/pull.go
index a4a6f60b05..05a8d59633 100644
--- a/modules/structs/pull.go
+++ b/modules/structs/pull.go
@@ -49,6 +49,8 @@ type PullRequest struct {
Updated *time.Time `json:"updated_at"`
// swagger:strfmt date-time
Closed *time.Time `json:"closed_at"`
+
+ PinOrder int `json:"pin_order"`
}
// PRBranchInfo information about a branch
diff --git a/modules/structs/repo.go b/modules/structs/repo.go
index 01239188c2..fc4ed03de5 100644
--- a/modules/structs/repo.go
+++ b/modules/structs/repo.go
@@ -374,3 +374,9 @@ type RepoTransfer struct {
Recipient *User `json:"recipient"`
Teams []*Team `json:"teams"`
}
+
+// NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed
+type NewIssuePinsAllowed struct {
+ Issues bool `json:"issues"`
+ PullRequests bool `json:"pull_requests"`
+}