From eb803ec5eb3a7e66a107873ce6ee584b8c77b131 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 4 Apr 2014 18:31:09 -0400 Subject: Add transfer repository --- modules/base/tool.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/base/tool.go b/modules/base/tool.go index 6876da7625..3946c4b56b 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -494,6 +494,8 @@ func ActionIcon(opType int) string { return "arrow-circle-o-right" case 6: // Create issue. return "exclamation-circle" + case 8: // Transfer repository. + return "share" default: return "invalid type" } @@ -503,8 +505,9 @@ const ( TPL_CREATE_REPO = `%s created repository %s` TPL_COMMIT_REPO = `%s pushed to %s at %s%s` TPL_COMMIT_REPO_LI = `
user-avatar %s %s
` - TPL_CREATE_Issue = `%s opened issue %s#%s + TPL_CREATE_ISSUE = `%s opened issue %s#%s
user-avatar %s
` + TPL_TRANSFER_REPO = `%s transfered repository %s to %s` ) type PushCommit struct { @@ -547,8 +550,11 @@ func ActionDesc(act Actioner) string { buf.String()) case 6: // Create issue. infos := strings.SplitN(content, "|", 2) - return fmt.Sprintf(TPL_CREATE_Issue, actUserName, actUserName, repoLink, infos[0], repoLink, infos[0], + return fmt.Sprintf(TPL_CREATE_ISSUE, actUserName, actUserName, repoLink, infos[0], repoLink, infos[0], AvatarLink(email), infos[1]) + case 8: // Transfer repository. + newRepoLink := content + "/" + repoName + return fmt.Sprintf(TPL_TRANSFER_REPO, actUserName, actUserName, repoLink, newRepoLink, newRepoLink) default: return "invalid type" } -- cgit v1.2.3