Fix code formatting
This commit is contained in:
parent
13df8f596e
commit
f4d086b1f5
|
|
@ -83,15 +83,15 @@ func assembleKeywordsPattern(words []string) string {
|
||||||
func init() {
|
func init() {
|
||||||
// populate with details to find keywords for reference, reopen, close
|
// populate with details to find keywords for reference, reopen, close
|
||||||
issueKeywordsToFind = []*IssueKeywordsToFind{
|
issueKeywordsToFind = []*IssueKeywordsToFind{
|
||||||
&IssueKeywordsToFind{
|
{
|
||||||
Pattern: regexp.MustCompile(issueRefRegexpStr),
|
Pattern: regexp.MustCompile(issueRefRegexpStr),
|
||||||
KeywordsFoundMask: KeywordsFoundReference,
|
KeywordsFoundMask: KeywordsFoundReference,
|
||||||
},
|
},
|
||||||
&IssueKeywordsToFind{
|
{
|
||||||
Pattern: regexp.MustCompile(assembleKeywordsPattern(issueReopenKeywords)),
|
Pattern: regexp.MustCompile(assembleKeywordsPattern(issueReopenKeywords)),
|
||||||
KeywordsFoundMask: KeywordsFoundReopen,
|
KeywordsFoundMask: KeywordsFoundReopen,
|
||||||
},
|
},
|
||||||
&IssueKeywordsToFind{
|
{
|
||||||
Pattern: regexp.MustCompile(assembleKeywordsPattern(issueCloseKeywords)),
|
Pattern: regexp.MustCompile(assembleKeywordsPattern(issueCloseKeywords)),
|
||||||
KeywordsFoundMask: KeywordsFoundClose,
|
KeywordsFoundMask: KeywordsFoundClose,
|
||||||
},
|
},
|
||||||
|
|
@ -509,13 +509,13 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit, com
|
||||||
|
|
||||||
if commitsAreMerged {
|
if commitsAreMerged {
|
||||||
// take no action if both KeywordsFoundClose and KeywordsFoundOpen are set
|
// take no action if both KeywordsFoundClose and KeywordsFoundOpen are set
|
||||||
if (mask & (KeywordsFoundReopen|KeywordsFoundClose)) == KeywordsFoundClose {
|
if (mask & (KeywordsFoundReopen | KeywordsFoundClose)) == KeywordsFoundClose {
|
||||||
if issue.RepoID == repo.ID && !issue.IsClosed {
|
if issue.RepoID == repo.ID && !issue.IsClosed {
|
||||||
if err = issue.ChangeStatus(doer, repo, true); err != nil {
|
if err = issue.ChangeStatus(doer, repo, true); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (mask & (KeywordsFoundReopen|KeywordsFoundClose)) == KeywordsFoundReopen {
|
} else if (mask & (KeywordsFoundReopen | KeywordsFoundClose)) == KeywordsFoundReopen {
|
||||||
if issue.RepoID == repo.ID && issue.IsClosed {
|
if issue.RepoID == repo.ID && issue.IsClosed {
|
||||||
if err = issue.ChangeStatus(doer, repo, false); err != nil {
|
if err = issue.ChangeStatus(doer, repo, false); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user