Fix code formatting

This commit is contained in:
Keith Rutkowski 2018-03-27 13:05:14 -04:00
parent 13df8f596e
commit f4d086b1f5
3 changed files with 13 additions and 13 deletions

View File

@ -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