#1597 fix activitity feeds for pull requests

This commit is contained in:
Unknwon committed 2016-03-05 12:58:51 -05:00
1 parent a2f13eae55
commit 414eb22ef9
10 files changed
+338 -278

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
##### Current version: 0.8.57
##### Current version: 0.8.58
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
+2
View File
@@ -1064,6 +1064,8 @@ create_issue = `opened issue <a href="%s/issues/%s">%s#%[2]s</a>`
close_issue = `closed issue <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_issue = `reopened issue <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request = `created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
close_pull_request = `closed pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
reopen_pull_request = `reopened pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue = `commented on issue <a href="%s/issues/%s">%s#%[2]s</a>`
merge_pull_request = `merged pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
transfer_repo = transfered repository <code>%s</code> to <a href="%s">%s</a>
+1 -1
View File
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.8.57.0305"
const APP_VER = "0.8.58.0305"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
+2
View File
@@ -41,6 +41,8 @@ const (
ACTION_MERGE_PULL_REQUEST // 11
ACTION_CLOSE_ISSUE // 12
ACTION_REOPEN_ISSUE // 13
ACTION_CLOSE_PULL_REQUEST // 14
ACTION_REOPEN_PULL_REQUEST // 15
)
var (
+6 -269
View File
@@ -219,6 +219,7 @@ func (i *Issue) ReadBy(uid int64) error {
}
func (i *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository, isClosed bool) (err error) {
// Nothing should be performed if current status is same as target status
if i.IsClosed == isClosed {
return nil
}
@@ -230,7 +231,7 @@ func (i *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository, isCl
return err
}
// Update labels.
// Update issue count of labels
if err = i.getLabels(e); err != nil {
return err
}
@@ -245,12 +246,12 @@ func (i *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository, isCl
}
}
// Update milestone.
// Update issue count of milestone
if err = changeMilestoneIssueStats(e, i); err != nil {
return err
}
// New action comment.
// New action comment
if _, err = createStatusComment(e, doer, repo, i); err != nil {
return err
}
@@ -258,7 +259,7 @@ func (i *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository, isCl
return nil
}
// ChangeStatus changes issue status to open/closed.
// ChangeStatus changes issue status to open or closed.
func (i *Issue) ChangeStatus(doer *User, repo *Repository, isClosed bool) (err error) {
sess := x.NewSession()
defer sessionRelease(sess)
@@ -857,7 +858,7 @@ func UpdateIssue(issue *Issue) error {
return updateIssue(x, issue)
}
// updateIssueCols updates specific fields of given issue.
// updateIssueCols only updates values of specific columns for given issue.
func updateIssueCols(e Engine, issue *Issue, cols ...string) error {
_, err := e.Id(issue.ID).Cols(cols...).Update(issue)
return err
@@ -1241,270 +1242,6 @@ func DeleteMilestoneByID(id int64) error {
return sess.Commit()
}
// _________ __
// \_ ___ \ ____ _____ _____ ____ _____/ |_
// / \ \/ / _ \ / \ / \_/ __ \ / \ __\
// \ \___( <_> ) Y Y \ Y Y \ ___/| | \ |
// \______ /\____/|__|_| /__|_| /\___ >___| /__|
// \/ \/ \/ \/ \/
// CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
type CommentType int
const (
// Plain comment, can be associated with a commit (CommitId > 0) and a line (Line > 0)
COMMENT_TYPE_COMMENT CommentType = iota
COMMENT_TYPE_REOPEN
COMMENT_TYPE_CLOSE
// References.
COMMENT_TYPE_ISSUE_REF
// Reference from a commit (not part of a pull request)
COMMENT_TYPE_COMMIT_REF
// Reference from a comment
COMMENT_TYPE_COMMENT_REF
// Reference from a pull request
COMMENT_TYPE_PULL_REF
)
type CommentTag int
const (
COMMENT_TAG_NONE CommentTag = iota
COMMENT_TAG_POSTER
COMMENT_TAG_ADMIN
COMMENT_TAG_OWNER
)
// Comment represents a comment in commit and issue page.
type Comment struct {
ID int64 `xorm:"pk autoincr"`
Type CommentType
PosterID int64
Poster *User `xorm:"-"`
IssueID int64 `xorm:"INDEX"`
CommitID int64
Line int64
Content string `xorm:"TEXT"`
RenderedContent string `xorm:"-"`
Created time.Time `xorm:"CREATED"`
// Reference issue in commit message
CommitSHA string `xorm:"VARCHAR(40)"`
Attachments []*Attachment `xorm:"-"`
// For view issue page.
ShowTag CommentTag `xorm:"-"`
}
func (c *Comment) AfterSet(colName string, _ xorm.Cell) {
var err error
switch colName {
case "id":
c.Attachments, err = GetAttachmentsByCommentID(c.ID)
if err != nil {
log.Error(3, "GetAttachmentsByCommentID[%d]: %v", c.ID, err)
}
case "poster_id":
c.Poster, err = GetUserByID(c.PosterID)
if err != nil {
if IsErrUserNotExist(err) {
c.PosterID = -1
c.Poster = NewFakeUser()
} else {
log.Error(3, "GetUserByID[%d]: %v", c.ID, err)
}
}
case "created":
c.Created = regulateTimeZone(c.Created)
}
}
func (c *Comment) AfterDelete() {
_, err := DeleteAttachmentsByComment(c.ID, true)
if err != nil {
log.Info("Could not delete files for comment %d on issue #%d: %s", c.ID, c.IssueID, err)
}
}
// HashTag returns unique hash tag for comment.
func (c *Comment) HashTag() string {
return "issuecomment-" + com.ToStr(c.ID)
}
// EventTag returns unique event hash tag for comment.
func (c *Comment) EventTag() string {
return "event-" + com.ToStr(c.ID)
}
func createComment(e *xorm.Session, u *User, repo *Repository, issue *Issue, commitID, line int64, cmtType CommentType, content, commitSHA string, uuids []string) (_ *Comment, err error) {
comment := &Comment{
PosterID: u.Id,
Type: cmtType,
IssueID: issue.ID,
CommitID: commitID,
Line: line,
Content: content,
CommitSHA: commitSHA,
}
if _, err = e.Insert(comment); err != nil {
return nil, err
}
// Compose comment action, could be plain comment, close or reopen issue.
// This object will be used to notify watchers in the end of function.
act := &Action{
ActUserID: u.Id,
ActUserName: u.Name,
ActEmail: u.Email,
Content: fmt.Sprintf("%d|%s", issue.Index, strings.Split(content, "\n")[0]),
RepoID: repo.ID,
RepoUserName: repo.Owner.Name,
RepoName: repo.Name,
IsPrivate: repo.IsPrivate,
}
// Check comment type.
switch cmtType {
case COMMENT_TYPE_COMMENT:
act.OpType = ACTION_COMMENT_ISSUE
if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", issue.ID); err != nil {
return nil, err
}
// Check attachments.
attachments := make([]*Attachment, 0, len(uuids))
for _, uuid := range uuids {
attach, err := getAttachmentByUUID(e, uuid)
if err != nil {
if IsErrAttachmentNotExist(err) {
continue
}
return nil, fmt.Errorf("getAttachmentByUUID[%s]: %v", uuid, err)
}
attachments = append(attachments, attach)
}
for i := range attachments {
attachments[i].IssueID = issue.ID
attachments[i].CommentID = comment.ID
// No assign value could be 0, so ignore AllCols().
if _, err = e.Id(attachments[i].ID).Update(attachments[i]); err != nil {
return nil, fmt.Errorf("update attachment[%d]: %v", attachments[i].ID, err)
}
}
case COMMENT_TYPE_REOPEN:
act.OpType = ACTION_REOPEN_ISSUE
if issue.IsPull {
_, err = e.Exec("UPDATE `repository` SET num_closed_pulls=num_closed_pulls-1 WHERE id=?", repo.ID)
} else {
_, err = e.Exec("UPDATE `repository` SET num_closed_issues=num_closed_issues-1 WHERE id=?", repo.ID)
}
if err != nil {
return nil, err
}
case COMMENT_TYPE_CLOSE:
act.OpType = ACTION_CLOSE_ISSUE
if issue.IsPull {
_, err = e.Exec("UPDATE `repository` SET num_closed_pulls=num_closed_pulls+1 WHERE id=?", repo.ID)
} else {
_, err = e.Exec("UPDATE `repository` SET num_closed_issues=num_closed_issues+1 WHERE id=?", repo.ID)
}
if err != nil {
return nil, err
}
}
// Notify watchers for whatever action comes in.
if err = notifyWatchers(e, act); err != nil {
return nil, fmt.Errorf("notifyWatchers: %v", err)
}
return comment, nil
}
func createStatusComment(e *xorm.Session, doer *User, repo *Repository, issue *Issue) (*Comment, error) {
cmtType := COMMENT_TYPE_CLOSE
if !issue.IsClosed {
cmtType = COMMENT_TYPE_REOPEN
}
return createComment(e, doer, repo, issue, 0, 0, cmtType, "", "", nil)
}
// CreateComment creates comment of issue or commit.
func CreateComment(doer *User, repo *Repository, issue *Issue, commitID, line int64, cmtType CommentType, content, commitSHA string, attachments []string) (comment *Comment, err error) {
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return nil, err
}
comment, err = createComment(sess, doer, repo, issue, commitID, line, cmtType, content, commitSHA, attachments)
if err != nil {
return nil, err
}
return comment, sess.Commit()
}
// CreateIssueComment creates a plain issue comment.
func CreateIssueComment(doer *User, repo *Repository, issue *Issue, content string, attachments []string) (*Comment, error) {
return CreateComment(doer, repo, issue, 0, 0, COMMENT_TYPE_COMMENT, content, "", attachments)
}
// CreateRefComment creates a commit reference comment to issue.
func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commitSHA string) error {
if len(commitSHA) == 0 {
return fmt.Errorf("cannot create reference with empty commit SHA")
}
// Check if same reference from same commit has already existed.
has, err := x.Get(&Comment{
Type: COMMENT_TYPE_COMMIT_REF,
IssueID: issue.ID,
CommitSHA: commitSHA,
})
if err != nil {
return fmt.Errorf("check reference comment: %v", err)
} else if has {
return nil
}
_, err = CreateComment(doer, repo, issue, 0, 0, COMMENT_TYPE_COMMIT_REF, content, commitSHA, nil)
return err
}
// GetCommentByID returns the comment by given ID.
func GetCommentByID(id int64) (*Comment, error) {
c := new(Comment)
has, err := x.Id(id).Get(c)
if err != nil {
return nil, err
} else if !has {
return nil, ErrCommentNotExist{id}
}
return c, nil
}
// GetCommentsByIssueID returns all comments of issue by given ID.
func GetCommentsByIssueID(issueID int64) ([]*Comment, error) {
comments := make([]*Comment, 0, 10)
return comments, x.Where("issue_id=?", issueID).Asc("created").Find(&comments)
}
// UpdateComment updates information of comment.
func UpdateComment(c *Comment) error {
_, err := x.Id(c.ID).AllCols().Update(c)
return err
}
// Attachment represent a attachment of issue/comment/release.
type Attachment struct {
ID int64 `xorm:"pk autoincr"`
+311
View File
@@ -0,0 +1,311 @@
// 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.
package models
import (
"fmt"
"strings"
"time"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
"github.com/gogits/gogs/modules/log"
)
// CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
type CommentType int
const (
// Plain comment, can be associated with a commit (CommitID > 0) and a line (LineNum > 0)
COMMENT_TYPE_COMMENT CommentType = iota
COMMENT_TYPE_REOPEN
COMMENT_TYPE_CLOSE
// References.
COMMENT_TYPE_ISSUE_REF
// Reference from a commit (not part of a pull request)
COMMENT_TYPE_COMMIT_REF
// Reference from a comment
COMMENT_TYPE_COMMENT_REF
// Reference from a pull request
COMMENT_TYPE_PULL_REF
)
type CommentTag int
const (
COMMENT_TAG_NONE CommentTag = iota
COMMENT_TAG_POSTER
COMMENT_TAG_ADMIN
COMMENT_TAG_OWNER
)
// Comment represents a comment in commit and issue page.
type Comment struct {
ID int64 `xorm:"pk autoincr"`
Type CommentType
PosterID int64
Poster *User `xorm:"-"`
IssueID int64 `xorm:"INDEX"`
CommitID int64
Line int64
Content string `xorm:"TEXT"`
RenderedContent string `xorm:"-"`
Created time.Time `xorm:"CREATED"`
// Reference issue in commit message
CommitSHA string `xorm:"VARCHAR(40)"`
Attachments []*Attachment `xorm:"-"`
// For view issue page.
ShowTag CommentTag `xorm:"-"`
}
func (c *Comment) AfterSet(colName string, _ xorm.Cell) {
var err error
switch colName {
case "id":
c.Attachments, err = GetAttachmentsByCommentID(c.ID)
if err != nil {
log.Error(3, "GetAttachmentsByCommentID[%d]: %v", c.ID, err)
}
case "poster_id":
c.Poster, err = GetUserByID(c.PosterID)
if err != nil {
if IsErrUserNotExist(err) {
c.PosterID = -1
c.Poster = NewFakeUser()
} else {
log.Error(3, "GetUserByID[%d]: %v", c.ID, err)
}
}
case "created":
c.Created = regulateTimeZone(c.Created)
}
}
func (c *Comment) AfterDelete() {
_, err := DeleteAttachmentsByComment(c.ID, true)
if err != nil {
log.Info("Could not delete files for comment %d on issue #%d: %s", c.ID, c.IssueID, err)
}
}
// HashTag returns unique hash tag for comment.
func (c *Comment) HashTag() string {
return "issuecomment-" + com.ToStr(c.ID)
}
// EventTag returns unique event hash tag for comment.
func (c *Comment) EventTag() string {
return "event-" + com.ToStr(c.ID)
}
func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err error) {
comment := &Comment{
Type: opts.Type,
PosterID: opts.Doer.Id,
IssueID: opts.Issue.ID,
CommitID: opts.CommitID,
CommitSHA: opts.CommitSHA,
Line: opts.LineNum,
Content: opts.Content,
}
if _, err = e.Insert(comment); err != nil {
return nil, err
}
// Compose comment action, could be plain comment, close or reopen issue.
// This object will be used to notify watchers in the end of function.
act := &Action{
ActUserID: opts.Doer.Id,
ActUserName: opts.Doer.Name,
ActEmail: opts.Doer.Email,
Content: fmt.Sprintf("%d|%s", opts.Issue.Index, strings.Split(opts.Content, "\n")[0]),
RepoID: opts.Repo.ID,
RepoUserName: opts.Repo.Owner.Name,
RepoName: opts.Repo.Name,
IsPrivate: opts.Repo.IsPrivate,
}
// Check comment type.
switch opts.Type {
case COMMENT_TYPE_COMMENT:
act.OpType = ACTION_COMMENT_ISSUE
if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil {
return nil, err
}
// Check attachments
attachments := make([]*Attachment, 0, len(opts.Attachments))
for _, uuid := range opts.Attachments {
attach, err := getAttachmentByUUID(e, uuid)
if err != nil {
if IsErrAttachmentNotExist(err) {
continue
}
return nil, fmt.Errorf("getAttachmentByUUID[%s]: %v", uuid, err)
}
attachments = append(attachments, attach)
}
for i := range attachments {
attachments[i].IssueID = opts.Issue.ID
attachments[i].CommentID = comment.ID
// No assign value could be 0, so ignore AllCols().
if _, err = e.Id(attachments[i].ID).Update(attachments[i]); err != nil {
return nil, fmt.Errorf("update attachment[%d]: %v", attachments[i].ID, err)
}
}
case COMMENT_TYPE_REOPEN:
act.OpType = ACTION_REOPEN_ISSUE
if opts.Issue.IsPull {
act.OpType = ACTION_REOPEN_PULL_REQUEST
}
if opts.Issue.IsPull {
_, err = e.Exec("UPDATE `repository` SET num_closed_pulls=num_closed_pulls-1 WHERE id=?", opts.Repo.ID)
} else {
_, err = e.Exec("UPDATE `repository` SET num_closed_issues=num_closed_issues-1 WHERE id=?", opts.Repo.ID)
}
if err != nil {
return nil, err
}
case COMMENT_TYPE_CLOSE:
act.OpType = ACTION_CLOSE_ISSUE
if opts.Issue.IsPull {
act.OpType = ACTION_CLOSE_PULL_REQUEST
}
if opts.Issue.IsPull {
_, err = e.Exec("UPDATE `repository` SET num_closed_pulls=num_closed_pulls+1 WHERE id=?", opts.Repo.ID)
} else {
_, err = e.Exec("UPDATE `repository` SET num_closed_issues=num_closed_issues+1 WHERE id=?", opts.Repo.ID)
}
if err != nil {
return nil, err
}
}
// Notify watchers for whatever action comes in
if err = notifyWatchers(e, act); err != nil {
return nil, fmt.Errorf("notifyWatchers: %v", err)
}
return comment, nil
}
func createStatusComment(e *xorm.Session, doer *User, repo *Repository, issue *Issue) (*Comment, error) {
cmtType := COMMENT_TYPE_CLOSE
if !issue.IsClosed {
cmtType = COMMENT_TYPE_REOPEN
}
return createComment(e, &CreateCommentOptions{
Type: cmtType,
Doer: doer,
Repo: repo,
Issue: issue,
})
}
type CreateCommentOptions struct {
Type CommentType
Doer *User
Repo *Repository
Issue *Issue
CommitID int64
CommitSHA string
LineNum int64
Content string
Attachments []string // UUIDs of attachments
}
// CreateComment creates comment of issue or commit.
func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error) {
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return nil, err
}
comment, err = createComment(sess, opts)
if err != nil {
return nil, err
}
return comment, sess.Commit()
}
// CreateIssueComment creates a plain issue comment.
func CreateIssueComment(doer *User, repo *Repository, issue *Issue, content string, attachments []string) (*Comment, error) {
return CreateComment(&CreateCommentOptions{
Type: COMMENT_TYPE_COMMENT,
Doer: doer,
Repo: repo,
Issue: issue,
Content: content,
Attachments: attachments,
})
}
// CreateRefComment creates a commit reference comment to issue.
func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commitSHA string) error {
if len(commitSHA) == 0 {
return fmt.Errorf("cannot create reference with empty commit SHA")
}
// Check if same reference from same commit has already existed.
has, err := x.Get(&Comment{
Type: COMMENT_TYPE_COMMIT_REF,
IssueID: issue.ID,
CommitSHA: commitSHA,
})
if err != nil {
return fmt.Errorf("check reference comment: %v", err)
} else if has {
return nil
}
_, err = CreateComment(&CreateCommentOptions{
Type: COMMENT_TYPE_COMMIT_REF,
Doer: doer,
Repo: repo,
Issue: issue,
CommitSHA: commitSHA,
Content: content,
})
return err
}
// GetCommentByID returns the comment by given ID.
func GetCommentByID(id int64) (*Comment, error) {
c := new(Comment)
has, err := x.Id(id).Get(c)
if err != nil {
return nil, err
} else if !has {
return nil, ErrCommentNotExist{id}
}
return c, nil
}
// GetCommentsByIssueID returns all comments of issue by given ID.
func GetCommentsByIssueID(issueID int64) ([]*Comment, error) {
comments := make([]*Comment, 0, 10)
return comments, x.Where("issue_id=?", issueID).Asc("created").Find(&comments)
}
// UpdateComment updates information of comment.
func UpdateComment(c *Comment) error {
_, err := x.Id(c.ID).AllCols().Update(c)
return err
}
+2 -2
View File
@@ -4322,7 +4322,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
return a, nil
}
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\xbd\xeb\x72\xdc\x48\xae\x27\xfe\x9d\x4f\xc1\xf6\x84\xc3\x76\x84\x5c\x8e\xee\x3e\xff\xff\x6e\x74\xb4\xdd\x2b\x4b\xed\xcb\x19\xcb\xd2\x48\x72\xf7\xce\x76\x38\xd8\xac\x22\x55\xc5\x71\x15\x59\x43\xb2\x24\x6b\x26\xe6\x0d\xf6\x01\xf6\xf9\xf6\x49\x16\xf8\x01\xc8\x0b\xc9\x92\xec\x9e\xe3\x0f\x16\x2b\x13\x79\x47\x22\x01\x24\x80\xcc\xb7\xdb\xac\x28\xbb\x45\xfa\x3c\x3d\x4c\xb7\x79\x55\xaf\xcb\xae\x4b\xbb\x72\x7d\xf5\x74\xd5\x74\x7d\x59\xa4\xaf\xab\x9e\x7e\xb7\xd7\xd5\xa2\x4c\x92\x55\xb3\x29\x09\xf4\x0d\xfd\x49\x8a\xbc\x5b\xcd\x9b\xbc\x2d\x28\xe1\xd8\xbe\x93\xf2\xf3\x76\xdd\xb4\x0c\xf4\xb3\x7c\x25\xab\x72\xbd\xe5\x32\xf4\x27\xe9\xaa\x65\x9d\x55\x35\xfd\xbc\xa0\xaf\xf4\x6d\x2d\x29\xcd\xae\xb7\xa4\xd3\x5d\x2f\x69\xbb\xad\x25\x7d\xd8\x26\x6d\xb9\xac\xa8\x37\x2d\x25\x9d\xeb\x67\x72\x53\xce\xbb\xaa\xe7\x96\x7e\x95\xaf\xe4\xba\x6c\xbb\xaa\xe1\xda\x7f\x91\xaf\x64\x9b\x2f\x19\xe0\x8c\xfe\x24\x7d\xb9\xd9\xae\x73\x14\xb8\xd4\xcf\x64\x9d\xd7\xcb\x9d\xc0\xbc\xd3\xcf\x64\xd1\x96\x94\x95\xd5\xe5\x0d\xa5\x1e\xe1\xc7\x6c\x36\x4b\x76\x34\x09\xd9\xb6\x6d\xae\xaa\x75\x99\xe5\x75\x91\x6d\x64\x98\x1f\x28\x3d\xd5\xf4\x94\xd2\x53\x4e\xc7\x10\xca\x82\x86\x9a\xe5\x9d\x8e\x83\xe6\x92\x46\x9e\x77\x09\xaa\xaa\xf3\x8d\x95\xe6\xcf\xa4\xdc\xe4\xd5\x9a\x67\x8d\xff\x52\xbf\xbb\xee\xa6\xc1\xd4\x9e\xe9\x27\xcd\x41\xd6\xdf\x6e\x4b\x4c\xc1\xd3\x4b\xfa\x4a\x16\xf9\xb6\x5f\xac\x72\xee\xa6\x7c\x25\x04\xb4\x6d\x68\x2e\x9a\xf6\x16\x70\xf6\x23\x69\xda\x65\x5e\x57\xff\xc8\x7b\x99\x9f\xd3\xe0\x67\xb2\xa9\xda\xb6\xe1\xa9\x3d\xc1\x47\x42\x23\xcf\xb8\x1e\x4a\x79\x4f\x93\x10\xd4\xc2\x39\x9b\x6a\xd9\xca\x2c\x72\xe6\x09\x7e\x71\x2d\x92\xa7\x35\x49\x96\xab\xed\xaa\x69\x3f\x69\xea\x2b\xfe\x1c\x54\x49\x9d\xd3\xdc\xb8\x5f\x79\x4d\xeb\xa1\xb9\x27\xf8\x11\x01\x74\x49\x5e\x6c\x68\x86\xb7\x79\x5d\xf2\xd4\x1d\xf2\x2f\x9a\x2f\xfa\x95\xe4\x8b\x45\xb3\xab\xfb\xac\x2b\xfb\xbe\xaa\x97\xbc\x06\x87\x92\x94\x5e\x68\x52\x12\xe4\xb9\xb4\xdb\x66\xe7\x56\x99\xd2\xff\x4a\x3f\xd3\x33\xf9\x29\x79\x41\x21\x64\xba\x92\xd4\x64\x5f\x5d\x57\x7d\x55\x4a\x63\xf6\x23\xd9\xee\xd6\x6b\x9a\xcf\xbf\xef\xca\xae\xe7\xac\x33\xfa\x4d\x33\x20\xbf\x93\xaa\xeb\x76\x28\xf1\x16\x1f\x09\x2d\x6a\xbd\xc0\x70\x8e\xf0\x91\x24\xbf\x75\x65\xde\x2e\x56\x1f\x13\xf9\x8b\xde\xf2\x07\x23\xe5\xbe\xe5\x66\x0c\x53\xec\x92\x16\xac\x81\x64\xd1\x14\xfc\xe3\x88\xfe\x50\xd5\x55\xdd\xf5\xf9\x7a\xfd\x31\xd1\x0f\x06\x93\x2f\x59\x82\xbe\xea\x31\x0f\x9a\x98\x5e\xf4\xe5\xb6\xe3\x35\x4c\x5f\x55\x6d\xd7\x3f\xed\x2b\xc2\xe2\xf3\x5d\x9d\x14\xcd\xe2\x13\xed\x0f\xde\xeb\x68\xf9\xed\x55\x4a\xd3\xf5\x88\x76\x48\xbb\xab\x6b\x9a\xa0\xf4\x75\x43\x93\x46\xcd\x54\xd4\xfe\x31\xa0\x0f\xd2\xed\xba\xcc\x3b\x02\x29\xf3\x22\xfd\x31\x4f\xfb\xbc\x5d\x96\xfd\xf3\x07\xd9\x9c\xf6\xe5\xa7\x07\xe9\xaa\x2d\xaf\x9e\x3f\x78\xd8\x3d\x78\xf1\x7a\x47\xc5\xd6\x55\x5d\x76\x3f\x3e\xcb\x5f\xa4\x8b\x9c\x72\x68\x1a\x6f\xd3\x79\x79\xc5\xdb\x90\xda\x4a\x09\xff\xeb\x25\x6f\xc1\xdb\x7e\xc5\x0d\x12\x2e\xd0\x47\x97\x32\x0d\xf8\x26\xe1\x05\x20\x1a\x91\x15\x73\xa3\x77\xe8\x10\x92\x5b\x5a\x80\x93\xdb\x8b\xbf\xbc\x3b\x48\xcf\x88\xe8\x2d\xdb\x12\xdf\xf4\x1f\x95\xf8\x3e\xa5\xd1\x5e\x56\xc7\x2f\x67\x09\x95\xb5\x09\x39\xce\xfb\x7c\xce\x7d\x77\xeb\xcf\x99\xb2\x3d\x5d\x1e\x36\x29\x93\x51\x90\xcc\xae\x8f\x96\x65\x6a\x8b\x53\x1d\x4a\x17\x5c\x1d\xef\x99\x38\x50\xba\x9b\xd9\x33\x99\x33\xaa\x2a\x7d\xfb\xfe\xfd\xe9\xf1\xcb\xb4\xac\x97\x34\x33\xe9\x4d\xd5\xaf\xd2\x5d\x7f\xf5\xdf\xb3\x65\x59\x97\x6d\xbe\xce\x16\x15\x4f\x4a\x4b\x28\x9b\xd2\x2c\xc9\x10\x67\x49\xd7\xad\x89\x76\x01\x0b\x2e\x2e\xde\xa5\x27\x8c\x09\xdb\xbc\x5f\xa1\x23\xfd\x2a\xe9\xfe\xbe\xe6\x89\x72\x0d\x5e\xae\xca\x14\xdb\x01\x40\xcd\xd5\x70\x5e\xd2\x42\xfb\x3a\x4b\x7f\x9c\xb7\x2f\x82\xfe\xe5\xf3\xae\x59\xef\x7a\x2d\x79\xb3\x2a\x6b\x2c\x14\xa1\x52\xdb\x13\x21\xb4\x63\x65\x96\x94\x6d\x9b\x11\x49\xee\x6f\x79\x79\xb4\x2f\xfb\x5a\x91\xca\x68\x97\xd4\x4d\x4f\xcb\x9f\xa2\x9c\x54\x51\xd5\xd7\xf9\xba\x2a\x68\x91\xfc\x44\xc6\x65\x91\x58\x34\xb4\xde\x5c\x9a\x30\xba\xb9\xc1\x14\xd1\xde\xa5\x13\x23\x7d\x30\x7b\x00\x12\xfe\xe0\xe9\x83\x59\x52\x37\x99\xd0\x17\x26\xf6\x45\xd5\xe5\x73\x22\xfc\x72\x10\xb5\x46\x47\xff\xca\x78\x27\x5d\x51\x88\x34\x82\xe0\x35\xe1\xc3\x0d\x67\x0a\x23\x65\x4e\x27\x00\xc8\x94\x12\xa8\x70\xec\x46\xcd\x1c\x5e\x08\x41\x73\x09\xa3\x31\x27\xb6\xd0\x86\x95\x87\xdb\xed\xba\x5a\x48\xd3\xaf\x25\xcf\x23\x28\x1f\xf5\x3a\x29\x21\x1c\x10\xcc\xf2\x02\x34\xa3\x5e\x33\xc1\x4b\xa3\x93\x03\xe5\x57\x25\xed\xb8\xd5\x6e\x29\xc7\xdd\xba\xd9\x15\xdf\x80\x10\xd9\xca\x79\x3a\x94\x9e\x37\xd4\x61\x60\x95\x03\xf0\x4d\x1c\x12\x41\x61\xee\xa2\x2d\x37\x4d\xcf\x13\xa7\xc5\x98\x82\xde\x54\x94\x49\x23\xed\xf2\x6b\x3a\x37\xfb\x46\xb6\x72\x41\x5b\x75\xc1\x15\x13\xe5\xdb\x11\x8b\x20\xdb\x89\xe8\x8f\x6c\x29\x4b\x8b\x71\x17\x50\x9b\x1d\xed\xc2\x15\x55\xc6\x13\xcf\x2c\x0e\x55\x39\xd5\x4f\x0c\x89\xea\x01\x75\xa0\x1d\xdf\xd0\x71\xcc\x0b\x7d\x8c\x0f\xfd\x1d\xd6\x4f\xbd\xca\xaf\xae\xa8\x57\x1d\xed\xa6\x37\xe9\x62\xdd\xd0\x56\xfc\x70\xfe\xae\xe3\x8d\xb6\xca\xb6\x4d\x0b\xd6\x86\xb2\xce\xeLine truncated
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\xbd\xeb\x72\xdc\x48\xae\x27\xfe\x9d\x4f\xc1\xf6\x84\xc3\x76\x84\x5c\x8e\xee\x3e\xff\xff\x6e\x74\xb4\xdd\x2b\x4b\xed\xcb\x19\xcb\xd2\x48\x72\xf7\xce\x76\x38\xd8\xac\x22\x55\xc5\x71\x15\x59\x43\xb2\x24\x6b\x26\xe6\x0d\xf6\x01\xf6\xf9\xf6\x49\x16\xf8\x01\xc8\x0b\xc9\x92\xec\x9e\xe3\x0f\x16\x2b\x13\x79\x47\x22\x01\x24\x80\xcc\xb7\xdb\xac\x28\xbb\x45\xfa\x3c\x3d\x4c\xb7\x79\x55\xaf\xcb\xae\x4b\xbb\x72\x7d\xf5\x74\xd5\x74\x7d\x59\xa4\xaf\xab\x9e\x7e\xb7\xd7\xd5\xa2\x4c\x92\x55\xb3\x29\x09\xf4\x0d\xfd\x49\x8a\xbc\x5b\xcd\x9b\xbc\x2d\x28\xe1\xd8\xbe\x93\xf2\xf3\x76\xdd\xb4\x0c\xf4\xb3\x7c\x25\xab\x72\xbd\xe5\x32\xf4\x27\xe9\xaa\x65\x9d\x55\x35\xfd\xbc\xa0\xaf\xf4\x6d\x2d\x29\xcd\xae\xb7\xa4\xd3\x5d\x2f\x69\xbb\xad\x25\x7d\xd8\x26\x6d\xb9\xac\xa8\x37\x2d\x25\x9d\xeb\x67\x72\x53\xce\xbb\xaa\xe7\x96\x7e\x95\xaf\xe4\xba\x6c\xbb\xaa\xe1\xda\x7f\x91\xaf\x64\x9b\x2f\x19\xe0\x8c\xfe\x24\x7d\xb9\xd9\xae\x73\x14\xb8\xd4\xcf\x64\x9d\xd7\xcb\x9d\xc0\xbc\xd3\xcf\x64\xd1\x96\x94\x95\xd5\xe5\x0d\xa5\x1e\xe1\xc7\x6c\x36\x4b\x76\x34\x09\xd9\xb6\x6d\xae\xaa\x75\x99\xe5\x75\x91\x6d\x64\x98\x1f\x28\x3d\xd5\xf4\x94\xd2\x53\x4e\xc7\x10\xca\x82\x86\x9a\xe5\x9d\x8e\x83\xe6\x92\x46\x9e\x77\x09\xaa\xaa\xf3\x8d\x95\xe6\xcf\xa4\xdc\xe4\xd5\x9a\x67\x8d\xff\x52\xbf\xbb\xee\xa6\xc1\xd4\x9e\xe9\x27\xcd\x41\xd6\xdf\x6e\x4b\x4c\xc1\xd3\x4b\xfa\x4a\x16\xf9\xb6\x5f\xac\x72\xee\xa6\x7c\x25\x04\xb4\x6d\x68\x2e\x9a\xf6\x16\x70\xf6\x23\x69\xda\x65\x5e\x57\xff\xc8\x7b\x99\x9f\xd3\xe0\x67\xb2\xa9\xda\xb6\xe1\xa9\x3d\xc1\x47\x42\x23\xcf\xb8\x1e\x4a\x79\x4f\x93\x10\xd4\xc2\x39\x9b\x6a\xd9\xca\x2c\x72\xe6\x09\x7e\x71\x2d\x92\xa7\x35\x49\x96\xab\xed\xaa\x69\x3f\x69\xea\x2b\xfe\x1c\x54\x49\x9d\xd3\xdc\xb8\x5f\x79\x4d\xeb\xa1\xb9\x27\xf8\x11\x01\x74\x49\x5e\x6c\x68\x86\xb7\x79\x5d\xf2\xd4\x1d\xf2\x2f\x9a\x2f\xfa\x95\xe4\x8b\x45\xb3\xab\xfb\xac\x2b\xfb\xbe\xaa\x97\xbc\x06\x87\x92\x94\x5e\x68\x52\x12\xe4\xb9\xb4\xdb\x66\xe7\x56\x99\xd2\xff\x4a\x3f\xd3\x33\xf9\x29\x79\x41\x21\x64\xba\x92\xd4\x64\x5f\x5d\x57\x7d\x55\x4a\x63\xf6\x23\xd9\xee\xd6\x6b\x9a\xcf\xbf\xef\xca\xae\xe7\xac\x33\xfa\x4d\x33\x20\xbf\x93\xaa\xeb\x76\x28\xf1\x16\x1f\x09\x2d\x6a\xbd\xc0\x70\x8e\xf0\x91\x24\xbf\x75\x65\xde\x2e\x56\x1f\x13\xf9\x8b\xde\xf2\x07\x23\xe5\xbe\xe5\x66\x0c\x53\xec\x92\x16\xac\x81\x64\xd1\x14\xfc\xe3\x88\xfe\x50\xd5\x55\xdd\xf5\xf9\x7a\xfd\x31\xd1\x0f\x06\x93\x2f\x59\x82\xbe\xea\x31\x0f\x9a\x98\x5e\xf4\xe5\xb6\xe3\x35\x4c\x5f\x55\x6d\xd7\x3f\xed\x2b\xc2\xe2\xf3\x5d\x9d\x14\xcd\xe2\x13\xed\x0f\xde\xeb\x68\xf9\xed\x55\x4a\xd3\xf5\x88\x76\x48\xbb\xab\x6b\x9a\xa0\xf4\x75\x43\x93\x46\xcd\x54\xd4\xfe\x31\xa0\x0f\xd2\xed\xba\xcc\x3b\x02\x29\xf3\x22\xfd\x31\x4f\xfb\xbc\x5d\x96\xfd\xf3\x07\xd9\x9c\xf6\xe5\xa7\x07\xe9\xaa\x2d\xaf\x9e\x3f\x78\xd8\x3d\x78\xf1\x7a\x47\xc5\xd6\x55\x5d\x76\x3f\x3e\xcb\x5f\xa4\x8b\x9c\x72\x68\x1a\x6f\xd3\x79\x79\xc5\xdb\x90\xda\x4a\x09\xff\xeb\x25\x6f\xc1\xdb\x7e\xc5\x0d\x12\x2e\xd0\x47\x97\x32\x0d\xf8\x26\xe1\x05\x20\x1a\x91\x15\x73\xa3\x77\xe8\x10\x92\x5b\x5a\x80\x93\xdb\x8b\xbf\xbc\x3b\x48\xcf\x88\xe8\x2d\xdb\x12\xdf\xf4\x1f\x95\xf8\x3e\xa5\xd1\x5e\x56\xc7\x2f\x67\x09\x95\xb5\x09\x39\xce\xfb\x7c\xce\x7d\x77\xeb\xcf\x99\xb2\x3d\x5d\x1e\x36\x29\x93\x51\x90\xcc\xae\x8f\x96\x65\x6a\x8b\x53\x1d\x4a\x17\x5c\x1d\xef\x99\x38\x50\xba\x9b\xd9\x33\x99\x33\xaa\x2a\x7d\xfb\xfe\xfd\xe9\xf1\xcb\xb4\xac\x97\x34\x33\xe9\x4d\xd5\xaf\xd2\x5d\x7f\xf5\xdf\xb3\x65\x59\x97\x6d\xbe\xce\x16\x15\x4f\x4a\x4b\x28\x9b\xd2\x2c\xc9\x10\x67\x49\xd7\xad\x89\x76\x01\x0b\x2e\x2e\xde\xa5\x27\x8c\x09\xdb\xbc\x5f\xa1\x23\xfd\x2a\xe9\xfe\xbe\xe6\x89\x72\x0d\x5e\xae\xca\x14\xdb\x01\x40\xcd\xd5\x70\x5e\xd2\x42\xfb\x3a\x4b\x7f\x9c\xb7\x2f\x82\xfe\xe5\xf3\xae\x59\xef\x7a\x2d\x79\xb3\x2a\x6b\x2c\x14\xa1\x52\xdb\x13\x21\xb4\x63\x65\x96\x94\x6d\x9b\x11\x49\xee\x6f\x79\x79\xb4\x2f\xfb\x5a\x91\xca\x68\x97\xd4\x4d\x4f\xcb\x9f\xa2\x9c\x54\x51\xd5\xd7\xf9\xba\x2a\x68\x91\xfc\x44\xc6\x65\x91\x58\x34\xb4\xde\x5c\x9a\x30\xba\xb9\xc1\x14\xd1\xde\xa5\x13\x23\x7d\x30\x7b\x00\x12\xfe\xe0\xe9\x83\x59\x52\x37\x99\xd0\x17\x26\xf6\x45\xd5\xe5\x73\x22\xfc\x72\x10\xb5\x46\x47\xff\xca\x78\x27\x5d\x51\x88\x34\x82\xe0\x35\xe1\xc3\x0d\x67\x0a\x23\x65\x4e\x27\x00\xc8\x94\x12\xa8\x70\xec\x46\xcd\x1c\x5e\x08\x41\x73\x09\xa3\x31\x27\xb6\xd0\x86\x95\x87\xdb\xed\xba\x5a\x48\xd3\xaf\x25\xcf\x23\x28\x1f\xf5\x3a\x29\x21\x1c\x10\xcc\xf2\x02\x34\xa3\x5e\x33\xc1\x4b\xa3\x93\x03\xe5\x57\x25\xed\xb8\xd5\x6e\x29\xc7\xdd\xba\xd9\x15\xdf\x80\x10\xd9\xca\x79\x3a\x94\x9e\x37\xd4\x61\x60\x95\x03\xf0\x4d\x1c\x12\x41\x61\xee\xa2\x2d\x37\x4d\xcf\x13\xa7\xc5\x98\x82\xde\x54\x94\x49\x23\xed\xf2\x6b\x3a\x37\xfb\x46\xb6\x72\x41\x5b\x75\xc1\x15\x13\xe5\xdb\x11\x8b\x20\xdb\x89\xe8\x8f\x6c\x29\x4b\x8b\x71\x17\x50\x9b\x1d\xed\xc2\x15\x55\xc6\x13\xcf\x2c\x0e\x55\x39\xd5\x4f\x0c\x89\xea\x01\x75\xa0\x1d\xdf\xd0\x71\xcc\x0b\x7d\x8c\x0f\xfd\x1d\xd6\x4f\xbd\xca\xaf\xae\xa8\x57\x1d\xed\xa6\x37\xe9\x62\xdd\xd0\x56\xfc\x70\xfe\xae\xe3\x8d\xb6\xca\xb6\x4d\x0b\xd6\x86\xb2\xce\xeLine truncated
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
return bindataRead(
@@ -4337,7 +4337,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 50409, mode: os.FileMode(420), modTime: time.Unix(1457156822, 0)}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 50568, mode: os.FileMode(420), modTime: time.Unix(1457200520, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
+4 -2
View File
@@ -233,7 +233,7 @@ func ActionIcon(opType int) string {
return "repo"
case 5, 9: // Commit repository
return "git-commit"
case 6, 13: // Create and reopen issue
case 6: // Create issue
return "issue-opened"
case 7: // New pull request
return "git-pull-request"
@@ -241,8 +241,10 @@ func ActionIcon(opType int) string {
return "comment"
case 11: // Merge pull request
return "git-merge"
case 12: // Close issue
case 12, 14: // Close issue or pull request
return "issue-closed"
case 13, 15: // Reopen issue or pull request
return "issue-reopened"
default:
return "invalid type"
}
+1 -1
View File
@@ -1 +1 @@
0.8.57.0305
0.8.58.0305
+8 -2
View File
@@ -37,6 +37,12 @@
{{else if eq .GetOpType 13}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.reopen_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
{{else if eq .GetOpType 14}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.close_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
{{else if eq .GetOpType 15}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.reopen_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
{{end}}
</p>
{{if eq .GetOpType 5}}
@@ -55,13 +61,13 @@
{{else if eq .GetOpType 6}}
<span class="text truncate issue title has-emoji">{{index .GetIssueInfos 1}}</span>
{{else if eq .GetOpType 7}}
<p class="text light grey has-emoji">{{index .GetIssueInfos 1}}</p>
<span class="text truncate issue title has-emoji">{{index .GetIssueInfos 1}}</span>
{{else if eq .GetOpType 10}}
<span class="text truncate issue title has-emoji">{{.GetIssueTitle}}</span>
<p class="text light grey has-emoji">{{index .GetIssueInfos 1}}</p>
{{else if eq .GetOpType 11}}
<p class="text light grey has-emoji">{{index .GetIssueInfos 1}}</p>
{{else if (or (eq .GetOpType 12) (eq .GetOpType 13))}}
{{else if (or (or (eq .GetOpType 12) (eq .GetOpType 13)) (or (eq .GetOpType 14) (eq .GetOpType 15)))}}
<span class="text truncate issue title has-emoji">{{.GetIssueTitle}}</span>
{{end}}
<p class="text italic light grey">{{TimeSince .GetCreate $.i18n.Lang}}</p>