aboutsummaryrefslogtreecommitdiffstats
path: root/modules/references/references.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/references/references.go')
-rw-r--r--modules/references/references.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/references/references.go b/modules/references/references.go
index cfc01cd4c0..74837b8553 100644
--- a/modules/references/references.go
+++ b/modules/references/references.go
@@ -49,6 +49,13 @@ var (
giteaHostInit sync.Once
giteaHost string
giteaIssuePullPattern *regexp.Regexp
+
+ actionStrings = []string{
+ "none",
+ "closes",
+ "reopens",
+ "neutered",
+ }
)
// XRefAction represents the kind of effect a cross reference has once is resolved
@@ -65,6 +72,10 @@ const (
XRefActionNeutered // 3
)
+func (a XRefAction) String() string {
+ return actionStrings[a]
+}
+
// IssueReference contains an unverified cross-reference to a local issue or pull request
type IssueReference struct {
Index int64