summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/models/issue.go b/models/issue.go
index 0429ac4c8c..8a6b20727a 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -990,6 +990,17 @@ func (issue *Issue) GetLastEventLabel() string {
return "repo.issues.opened_by"
}
+// GetLastEventLabelFake returns the localization label for the current issue without providing a link in the username.
+func (issue *Issue) GetLastEventLabelFake() string {
+ if issue.IsClosed {
+ if issue.IsPull && issue.PullRequest.HasMerged {
+ return "repo.pulls.merged_by_fake"
+ }
+ return "repo.issues.closed_by_fake"
+ }
+ return "repo.issues.opened_by_fake"
+}
+
// NewIssueOptions represents the options of a new issue.
type NewIssueOptions struct {
Repo *Repository