mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-14 01:35:55 +09:00
#1821 add actions for close and reopen issues
This commit is contained in:
1 parent
90fab0be6b
commit
912f7b51e9
12 files changed
+68
-46
No files matched your search
@@ -3,7 +3,7 @@ Gogs - Go Git Service [
|
||||
|
||||
##### Current version: 0.8.41
|
||||
##### Current version: 0.8.42
|
||||
|
||||
| Web | UI | Preview |
|
||||
|:-------------:|:-------:|:-------:|
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ func checkVersion() {
|
||||
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
|
||||
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
|
||||
{"gopkg.in/macaron.v1", macaron.Version, "0.8.0"},
|
||||
{"github.com/gogits/git-module", git.Version, "0.2.5"},
|
||||
{"github.com/gogits/git-module", git.Version, "0.2.6"},
|
||||
{"github.com/gogits/go-gogs-client", gogs.Version, "0.7.3"},
|
||||
}
|
||||
for _, c := range checkers {
|
||||
|
||||
@@ -1040,6 +1040,8 @@ create_repo = created repository <a href="%s">%s</a>
|
||||
rename_repo = renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
|
||||
commit_repo = pushed to <a href="%[1]s/src/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
|
||||
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>`
|
||||
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>`
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.8.41.0221"
|
||||
const APP_VER = "0.8.42.0222"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
+21
-19
@@ -28,17 +28,19 @@ import (
|
||||
type ActionType int
|
||||
|
||||
const (
|
||||
CREATE_REPO ActionType = iota + 1 // 1
|
||||
RENAME_REPO // 2
|
||||
STAR_REPO // 3
|
||||
FOLLOW_REPO // 4
|
||||
COMMIT_REPO // 5
|
||||
CREATE_ISSUE // 6
|
||||
CREATE_PULL_REQUEST // 7
|
||||
TRANSFER_REPO // 8
|
||||
PUSH_TAG // 9
|
||||
COMMENT_ISSUE // 10
|
||||
MERGE_PULL_REQUEST // 11
|
||||
ACTION_CREATE_REPO ActionType = iota + 1 // 1
|
||||
ACTION_RENAME_REPO // 2
|
||||
ACTION_STAR_REPO // 3
|
||||
ACTION_WATCH_REPO // 4
|
||||
ACTION_COMMIT_REPO // 5
|
||||
ACTION_CREATE_ISSUE // 6
|
||||
ACTION_CREATE_PULL_REQUEST // 7
|
||||
ACTION_TRANSFER_REPO // 8
|
||||
ACTION_PUSH_TAG // 9
|
||||
ACTION_COMMENT_ISSUE // 10
|
||||
ACTION_MERGE_PULL_REQUEST // 11
|
||||
ACTION_CLOSE_ISSUE // 12
|
||||
ACTION_REOPEN_ISSUE // 13
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -178,7 +180,7 @@ func newRepoAction(e Engine, u *User, repo *Repository) (err error) {
|
||||
ActUserID: u.Id,
|
||||
ActUserName: u.Name,
|
||||
ActEmail: u.Email,
|
||||
OpType: CREATE_REPO,
|
||||
OpType: ACTION_CREATE_REPO,
|
||||
RepoID: repo.ID,
|
||||
RepoUserName: repo.Owner.Name,
|
||||
RepoName: repo.Name,
|
||||
@@ -201,7 +203,7 @@ func renameRepoAction(e Engine, actUser *User, oldRepoName string, repo *Reposit
|
||||
ActUserID: actUser.Id,
|
||||
ActUserName: actUser.Name,
|
||||
ActEmail: actUser.Email,
|
||||
OpType: RENAME_REPO,
|
||||
OpType: ACTION_RENAME_REPO,
|
||||
RepoID: repo.ID,
|
||||
RepoUserName: repo.Owner.Name,
|
||||
RepoName: repo.Name,
|
||||
@@ -443,10 +445,10 @@ func CommitRepoAction(
|
||||
}
|
||||
|
||||
isNewBranch := false
|
||||
opType := COMMIT_REPO
|
||||
opType := ACTION_COMMIT_REPO
|
||||
// Check it's tag push or branch.
|
||||
if strings.HasPrefix(refFullName, "refs/tags/") {
|
||||
opType = PUSH_TAG
|
||||
opType = ACTION_PUSH_TAG
|
||||
commit = &PushCommits{}
|
||||
} else {
|
||||
// if not the first commit, set the compareUrl
|
||||
@@ -502,7 +504,7 @@ func CommitRepoAction(
|
||||
}
|
||||
|
||||
switch opType {
|
||||
case COMMIT_REPO: // Push
|
||||
case ACTION_COMMIT_REPO: // Push
|
||||
p := &api.PushPayload{
|
||||
Ref: refFullName,
|
||||
Before: oldCommitID,
|
||||
@@ -530,7 +532,7 @@ func CommitRepoAction(
|
||||
})
|
||||
}
|
||||
|
||||
case PUSH_TAG: // Create
|
||||
case ACTION_PUSH_TAG: // Create
|
||||
return PrepareWebhooks(repo, HOOK_EVENT_CREATE, &api.CreatePayload{
|
||||
Ref: refName,
|
||||
RefType: "tag",
|
||||
@@ -547,7 +549,7 @@ func transferRepoAction(e Engine, actUser, oldOwner, newOwner *User, repo *Repos
|
||||
ActUserID: actUser.Id,
|
||||
ActUserName: actUser.Name,
|
||||
ActEmail: actUser.Email,
|
||||
OpType: TRANSFER_REPO,
|
||||
OpType: ACTION_TRANSFER_REPO,
|
||||
RepoID: repo.ID,
|
||||
RepoUserName: newOwner.Name,
|
||||
RepoName: repo.Name,
|
||||
@@ -578,7 +580,7 @@ func mergePullRequestAction(e Engine, actUser *User, repo *Repository, pull *Iss
|
||||
ActUserID: actUser.Id,
|
||||
ActUserName: actUser.Name,
|
||||
ActEmail: actUser.Email,
|
||||
OpType: MERGE_PULL_REQUEST,
|
||||
OpType: ACTION_MERGE_PULL_REQUEST,
|
||||
Content: fmt.Sprintf("%d|%s", pull.Index, pull.Name),
|
||||
RepoID: repo.ID,
|
||||
RepoUserName: repo.Owner.Name,
|
||||
|
||||
+25
-17
@@ -364,7 +364,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string)
|
||||
ActUserID: issue.Poster.Id,
|
||||
ActUserName: issue.Poster.Name,
|
||||
ActEmail: issue.Poster.Email,
|
||||
OpType: CREATE_ISSUE,
|
||||
OpType: ACTION_CREATE_ISSUE,
|
||||
Content: fmt.Sprintf("%d|%s", issue.Index, issue.Name),
|
||||
RepoID: repo.ID,
|
||||
RepoUserName: repo.Owner.Name,
|
||||
@@ -1564,9 +1564,24 @@ func createComment(e *xorm.Session, u *User, repo *Repository, issue *Issue, com
|
||||
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
|
||||
}
|
||||
@@ -1593,23 +1608,9 @@ func createComment(e *xorm.Session, u *User, repo *Repository, issue *Issue, com
|
||||
}
|
||||
}
|
||||
|
||||
// Notify watchers.
|
||||
act := &Action{
|
||||
ActUserID: u.Id,
|
||||
ActUserName: u.Name,
|
||||
ActEmail: u.Email,
|
||||
OpType: COMMENT_ISSUE,
|
||||
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,
|
||||
}
|
||||
if err = notifyWatchers(e, act); err != nil {
|
||||
return nil, 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 {
|
||||
@@ -1619,6 +1620,8 @@ func createComment(e *xorm.Session, u *User, repo *Repository, issue *Issue, com
|
||||
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 {
|
||||
@@ -1629,6 +1632,11 @@ func createComment(e *xorm.Session, u *User, repo *Repository, issue *Issue, com
|
||||
}
|
||||
}
|
||||
|
||||
// Notify watchers for whatever action comes in.
|
||||
if err = notifyWatchers(e, act); err != nil {
|
||||
return nil, fmt.Errorf("notifyWatchers: %v", err)
|
||||
}
|
||||
|
||||
return comment, nil
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -330,7 +330,7 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
|
||||
ActUserID: pull.Poster.Id,
|
||||
ActUserName: pull.Poster.Name,
|
||||
ActEmail: pull.Poster.Email,
|
||||
OpType: CREATE_PULL_REQUEST,
|
||||
OpType: ACTION_CREATE_PULL_REQUEST,
|
||||
Content: fmt.Sprintf("%d|%s", pull.Index, pull.Name),
|
||||
RepoID: repo.ID,
|
||||
RepoUserName: repo.Owner.Name,
|
||||
|
||||
@@ -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\xed\x72\x1c\x47\xae\x26\xfc\xbf\xae\xa2\xac\x09\x85\xac\x08\xaa\x1d\x1e\x9f\xf7\xdd\x0d\x87\x65\xaf\x24\x5a\x1f\xe7\x88\x22\x8f\x48\x79\x76\xd6\xa1\x68\x57\x77\x17\x9b\x35\xea\xae\xea\xa9\xaa\x16\x45\x4f\xcc\x1d\xec\x05\xec\xf5\xed\x95\x2c\xf0\x00\xc8\x44\x56\x55\x93\x92\xe7\xe8\x87\x58\x9d\x89\xfc\x46\x22\x01\x24\x80\x2c\x76\xbb\xf9\xaa\xec\x96\xf9\xe3\xfc\x49\xbe\x2b\xaa\x7a\x53\x76\x5d\xde\x95\x9b\xcb\x47\x57\x4d\xd7\x97\xab\xfc\x45\xd5\xd3\xef\xf6\x63\xb5\x2c\xb3\xec\xaa\xd9\x96\x04\xfa\x92\xfe\x64\xab\xa2\xbb\x5a\x34\x45\xbb\xa2\x84\x63\xfb\xce\xca\x4f\xbb\x4d\xd3\x32\xd0\xcf\xf2\x95\x5d\x95\x9b\x1d\x97\xa1\x3f\x59\x57\xad\xeb\x79\x55\xd3\xcf\x73\xfa\xca\x5f\xd5\x92\xd2\xec\x7b\x4b\x3a\xdd\xf7\x92\xb6\xdf\x59\xd2\xbb\x5d\xd6\x96\xeb\x8a\x7a\xd3\x52\xd2\x5b\xfd\xcc\xae\xcb\x45\x57\xf5\xdc\xd2\x5f\xe4\x2b\xfb\x58\xb6\x5d\xd5\x70\xed\xbf\xc8\x57\xb6\x2b\xd6\x0c\x70\x46\x7f\xb2\xbe\xdc\xee\x36\x05\x0a\x5c\xe8\x67\xb6\x29\xea\xf5\x5e\x60\x5e\xeb\x67\xb6\x6c\x4b\xca\x9a\xd7\xe5\x35\xa5\x3e\xc3\x8f\xd9\x6c\x96\xed\x69\x12\xe6\xbb\xb6\xb9\xac\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b\x8b\x76\x79\xf5\x3e\x93\xbf\xe8\x2d\x7f\x30\x52\x1e\x5a\x6e\xc6\x30\xc5\x2e\x69\xc1\x1a\xc8\x96\xcd\x8a\x7f\x3c\xa3\x3f\x54\x75\x55\x77\x7d\xb1\xd9\xbc\xcf\xf4\x83\xc1\xe4\x4b\x96\xa0\xaf\x7a\xcc\x83\x26\xe6\xe7\x7d\xb9\xeb\x78\x0d\xf3\xe7\x55\xdb\xf5\x8f\xfa\x8a\xb0\xf8\xed\xbe\xce\x56\xcd\xf2\x03\xed\x0f\xde\xeb\x68\xf9\xd5\x65\x4e\xd3\xf5\x80\x76\x48\xbb\xaf\x6b\x9a\xa0\xfc\x45\x43\x93\x46\xcd\x54\xd4\xfe\x31\xa0\x8f\xf2\xdd\xa6\x2c\x3a\x02\x29\x8b\x55\xfe\x43\x91\xf7\x45\xbb\x2e\xfb\xc7\xf7\xe6\x0b\xda\x97\x1f\xee\xe5\x57\x6d\x79\xf9\xf8\xde\xfd\xee\xde\x8f\x2f\xf6\x54\x6c\x53\xd5\x65\xf7\xc3\x37\xc5\x8f\xf9\xb2\xa0\x1c\x9a\xc6\x9b\x7c\x51\x5e\xf2\x36\xa4\xb6\x72\xc2\xff\x7a\xcd\x5b\xf0\xa6\xbf\xe2\x06\x09\x17\xe8\xa3\xcb\x99\x06\x7c\x95\xf1\x02\x10\x8d\x98\xaf\x16\x46\xef\xd0\x21\x24\xb7\xb4\x00\x27\x37\xe7\xff\xf9\xfa\x28\x3f\x23\xa2\xb7\x6e\x4b\x7c\xd3\x7f\x54\xe2\xbb\x9c\x46\x7b\x51\x1d\x3f\x9d\x65\x54\xd6\x26\xe4\xb8\xe8\x8b\x05\xf7\x3d\xac\x3f\x67\xca\xf6\x0c\x79\xd8\xa4\x4c\x46\x41\x32\xbb\x3e\x59\x96\xa9\x2d\x4e\x75\x28\x5d\x08\x75\xbc\x61\xe2\x40\xe9\x61\x66\xcf\x64\xce\xa8\xaa\xfc\xd5\x9b\x37\xa7\xc7\x4f\xf3\xb2\x5e\xd3\xcc\xe4\xd7\x55\x7f\x95\xef\xfb\xcb\xff\x3e\x5f\x97\x75\xd9\x16\x9b\xf9\xb2\xe2\x49\x69\x09\x65\x73\x9a\x25\x19\xe2\x2c\xeb\xba\x0d\xd1\x2e\x60\xc1\xf9\xf9\xeb\xfc\x84\x31\x61\x57\xf4\x57\xe8\x48\x7f\x95\x75\x7f\xdf\xf0\x44\x85\x06\x2f\xae\xca\x1c\xdb\x01\x40\xcd\xe5\x70\x5e\xf2\x95\xf6\x75\x96\xff\xb0\x68\x7f\x74\xfd\x2b\x16\x5d\xb3\xd9\xf7\x5a\xf2\xfa\xaa\xac\xb1\x50\x84\x4a\x6d\x4f\x84\xd0\x8e\x95\x59\x56\xb6\xed\x9c\x48\x72\x7f\xc3\xcb\xa3\x7d\x39\xd4\x8a\x54\x46\xbb\xa4\x6e\x7a\x5a\xfe\x1c\xe5\xa4\x8a\xaa\xfe\x58\x6c\xaa\x15\x2d\x52\x9c\xc8\xb4\x2c\x12\x57\x0d\xad\x37\x97\x26\x8c\x6e\xae\x31\x45\xb4\x77\xe9\xc4\xc8\xef\xcd\xee\x81\x84\xdf\x7b\x74\x6f\x96\xd5\xcd\x5c\xe8\x0b\x13\xfb\x55\xd5\x15\x0b\x22\xfc\x72\x10\xb5\x46\x47\xff\xca\x78\x27\x5d\x51\x88\x3c\x81\xe0\x35\xe1\xc3\x0d\x67\x0a\x23\x65\x41\x27\x00\xc8\x94\x12\x28\x3f\x76\xa3\x66\x01\x2f\x84\xa0\x85\x84\xd1\x98\x33\x5b\x68\xc3\xca\x27\xbb\xdd\xa6\x5a\x4a\xd3\x2f\x24\x2f\x22\x28\x1f\xf5\x3a\x29\x1e\x0e\x08\x66\x79\x0e\xcd\xa8\xd7\x4c\xf0\xf2\xe4\xe4\x40\xf9\xab\x92\x76\xdc\xd5\x7e\x2d\xc7\xdd\xa6\xd9\xaf\xbe\x02\x21\xb2\x95\x8b\x74\x28\x7f\xdb\x50\x87\x81\x55\x01\x20\x36\xf1\x84\x08\x0a\x73\x17\x6d\xb9\x6d\x7a\x9e\x38\x2d\xc6\x14\xf4\xba\xa2\x4c\x1a\x69\x57\x7c\xa4\x73\xb3\x6f\x64\x2b\xaf\x68\xab\x2e\xb9\x62\xa2\x7c\x7b\x62\x11\x64\x3b\x11\xfd\x91\x2d\x65\x69\x29\xee\x02\x6a\xbb\xa7\x5d\x78\x45\x95\xf1\xc4\x33\x8b\x43\x55\x4e\xf5\x13\x43\xa2\x7a\x40\x1d\x68\xc7\x37\x74\x1c\xf3\x42\x1f\xe3\x43\x7f\xfb\xfa\xa9\x57\xc5\xe5\x25\xf5\xaa\xa3\xdd\xf4\x32\x5f\x6e\x1a\xda\x8a\xef\xde\xbe\xee\x78\xa3\x5Line truncated
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\xbd\xed\x72\x1c\x47\xae\x26\xfc\xbf\xae\xa2\xac\x09\x85\xac\x08\xaa\x1d\x1e\x9f\xf7\xdd\x0d\x87\x65\xaf\x24\x5a\x1f\xe7\x88\x22\x8f\x48\x79\x76\xd6\xa1\x68\x57\x77\x17\x9b\x35\xea\xae\xea\xa9\xaa\x16\x45\x4f\xcc\x1d\xec\x05\xec\xf5\xed\x95\x2c\xf0\x00\xc8\x44\x56\x55\x93\x92\xe7\xe8\x87\x58\x9d\x89\xfc\x46\x22\x01\x24\x80\x2c\x76\xbb\xf9\xaa\xec\x96\xf9\xe3\xfc\x49\xbe\x2b\xaa\x7a\x53\x76\x5d\xde\x95\x9b\xcb\x47\x57\x4d\xd7\x97\xab\xfc\x45\xd5\xd3\xef\xf6\x63\xb5\x2c\xb3\xec\xaa\xd9\x96\x04\xfa\x92\xfe\x64\xab\xa2\xbb\x5a\x34\x45\xbb\xa2\x84\x63\xfb\xce\xca\x4f\xbb\x4d\xd3\x32\xd0\xcf\xf2\x95\x5d\x95\x9b\x1d\x97\xa1\x3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ff\x7a\xcd\x5b\xf0\xa6\xbf\xe2\x06\x09\x17\xe8\xa3\xcb\x99\x06\x7c\x95\xf1\x02\x10\x8d\x98\xaf\x16\x46\xef\xd0\x21\x24\xb7\xb4\x00\x27\x37\xe7\xff\xf9\xfa\x28\x3f\x23\xa2\xb7\x6e\x4b\x7c\xd3\x7f\x54\xe2\xbb\x9c\x46\x7b\x51\x1d\x3f\x9d\x65\x54\xd6\x26\xe4\xb8\xe8\x8b\x05\xf7\x3d\xac\x3f\x67\xca\xf6\x0c\x79\xd8\xa4\x4c\x46\x41\x32\xbb\x3e\x59\x96\xa9\x2d\x4e\x75\x28\x5d\x08\x75\xbc\x61\xe2\x40\xe9\x61\x66\xcf\x64\xce\xa8\xaa\xfc\xd5\x9b\x37\xa7\xc7\x4f\xf3\xb2\x5e\xd3\xcc\xe4\xd7\x55\x7f\x95\xef\xfb\xcb\xff\x3e\x5f\x97\x75\xd9\x16\x9b\xf9\xb2\xe2\x49\x69\x09\x65\x73\x9a\x25\x19\xe2\x2c\xeb\xba\x0d\xd1\x2e\x60\xc1\xf9\xf9\xeb\xfc\x84\x31\x61\x57\xf4\x57\xe8\x48\x7f\x95\x75\x7f\xdf\xf0\x44\x85\x06\x2f\xae\xca\x1c\xdb\x01\x40\xcd\xe5\x70\x5e\xf2\x95\xf6\x75\x96\xff\xb0\x68\x7f\x74\xfd\x2b\x16\x5d\xb3\xd9\xf7\x5a\xf2\xfa\xaa\xac\xb1\x50\x84\x4a\x6d\x4f\x84\xd0\x8e\x95\x59\x56\xb6\xed\x9c\x48\x72\x7f\xc3\xcb\xa3\x7d\x39\xd4\x8a\x54\x46\xbb\xa4\x6e\x7a\x5a\xfe\x1c\xe5\xa4\x8a\xaa\xfe\x58\x6c\xaa\x15\x2d\x52\x9c\xc8\xb4\x2c\x12\x57\x0d\xad\x37\x97\x26\x8c\x6e\xae\x31\x45\xb4\x77\xe9\xc4\xc8\xef\xcd\xee\x81\x84\xdf\x7b\x74\x6f\x96\xd5\xcd\x5c\xe8\x0b\x13\xfb\x55\xd5\x15\x0b\x22\xfc\x72\x10\xb5\x46\x47\xff\xca\x78\x27\x5d\x51\x88\x3c\x81\xe0\x35\xe1\xc3\x0d\x67\x0a\x23\x65\x41\x27\x00\xc8\x94\x12\x28\x3f\x76\xa3\x66\x01\x2f\x84\xa0\x85\x84\xd1\x98\x33\x5b\x68\xc3\xca\x27\xbb\xdd\xa6\x5a\x4a\xd3\x2f\x24\x2f\x22\x28\x1f\xf5\x3a\x29\x1e\x0e\x08\x66\x79\x0e\xcd\xa8\xd7\x4c\xf0\xf2\xe4\xe4\x40\xf9\xab\x92\x76\xdc\xd5\x7e\x2d\xc7\xdd\xa6\xd9\xaf\xbe\x02\x21\xb2\x95\x8b\x74\x28\x7f\xdb\x50\x87\x81\x55\x01\x20\x36\xf1\x84\x08\x0a\x73\x17\x6d\xb9\x6d\x7a\x9e\x38\x2d\xc6\x14\xf4\xba\xa2\x4c\x1a\x69\x57\x7c\xa4\x73\xb3\x6f\x64\x2b\xaf\x68\xab\x2e\xb9\x62\xa2\x7c\x7b\x62\x11\x64\x3b\x11\xfd\x91\x2d\x65\x69\x29\xee\x02\x6a\xbb\xa7\x5d\x78\x45\x95\xf1\xc4\x33\x8b\x43\x55\x4e\xf5\x13\x43\xa2\x7a\x40\x1d\x68\xc7\x37\x74\x1c\xf3\x42\x1f\xe3\x43\x7f\xfb\xfa\xa9\x57\xc5\xe5\x25\xf5\xaa\xa3\xdd\xf4\x32\x5f\x6e\x1a\xda\x8a\xef\xde\xbe\xee\x78\xa3\x5Line 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: 49328, mode: os.FileMode(420), modTime: time.Unix(1455998912, 0)}
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 49461, mode: os.FileMode(420), modTime: time.Unix(1456162167, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -229,11 +229,11 @@ type Actioner interface {
|
||||
// and returns a icon class name.
|
||||
func ActionIcon(opType int) string {
|
||||
switch opType {
|
||||
case 1, 8: // Create, transfer repository
|
||||
case 1, 8: // Create and transfer repository
|
||||
return "repo"
|
||||
case 5, 9: // Commit repository
|
||||
return "git-commit"
|
||||
case 6: // Create issue
|
||||
case 6, 13: // Create and reopen issue
|
||||
return "issue-opened"
|
||||
case 7: // New pull request
|
||||
return "git-pull-request"
|
||||
@@ -241,6 +241,8 @@ func ActionIcon(opType int) string {
|
||||
return "comment"
|
||||
case 11: // Merge pull request
|
||||
return "git-merge"
|
||||
case 12: // Close issue
|
||||
return "issue-closed"
|
||||
default:
|
||||
return "invalid type"
|
||||
}
|
||||
|
||||
@@ -918,7 +918,7 @@ func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) {
|
||||
if err = issue.ChangeStatus(ctx.User, form.Status == "close"); err != nil {
|
||||
log.Error(4, "ChangeStatus: %v", err)
|
||||
} else {
|
||||
log.Trace("Issue[%d] status changed to closed: %v", issue.ID, issue.IsClosed)
|
||||
log.Trace("Issue [%d] status changed to closed: %v", issue.ID, issue.IsClosed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.8.41.0221
|
||||
0.8.42.0222
|
||||
@@ -31,6 +31,12 @@
|
||||
{{else if eq .GetOpType 11}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
|
||||
{{else if eq .GetOpType 12}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.close_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
|
||||
{{else if eq .GetOpType 13}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.reopen_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
|
||||
{{end}}
|
||||
</p>
|
||||
{{if eq .GetOpType 5}}
|
||||
@@ -55,6 +61,8 @@
|
||||
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
|
||||
{{else if eq .GetOpType 11}}
|
||||
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
|
||||
{{else if (or (eq .GetOpType 12) (eq .GetOpType 13))}}
|
||||
<span class="text truncate issue title">{{.GetIssueTitle}}</span>
|
||||
{{end}}
|
||||
<p class="text italic light grey">{{TimeSince .GetCreate $.i18n.Lang}}</p>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user