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() {
// populate with details to find keywords for reference, reopen, close
issueKeywordsToFind = []*IssueKeywordsToFind{
&IssueKeywordsToFind{
{
Pattern: regexp.MustCompile(issueRefRegexpStr),
KeywordsFoundMask: KeywordsFoundReference,
},
&IssueKeywordsToFind{
{
Pattern: regexp.MustCompile(assembleKeywordsPattern(issueReopenKeywords)),
KeywordsFoundMask: KeywordsFoundReopen,
},
&IssueKeywordsToFind{
{
Pattern: regexp.MustCompile(assembleKeywordsPattern(issueCloseKeywords)),
KeywordsFoundMask: KeywordsFoundClose,
},
@ -509,13 +509,13 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit, com
if commitsAreMerged {
// 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 err = issue.ChangeStatus(doer, repo, true); err != nil {
return err
}
}
} else if (mask & (KeywordsFoundReopen|KeywordsFoundClose)) == KeywordsFoundReopen {
} else if (mask & (KeywordsFoundReopen | KeywordsFoundClose)) == KeywordsFoundReopen {
if issue.RepoID == repo.ID && issue.IsClosed {
if err = issue.ChangeStatus(doer, repo, false); err != nil {
return err

View File

@ -777,10 +777,10 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
mode, _ := AccessLevel(pull.Poster.ID, repo)
var (
baseBranch *Branch
headBranch *Branch
baseCommit *git.Commit
headCommit *git.Commit
baseBranch *Branch
headBranch *Branch
baseCommit *git.Commit
headCommit *git.Commit
baseGitRepo *git.Repository
)
if baseBranch, err = pr.BaseRepo.GetBranch(pr.BaseBranch); err != nil {

View File

@ -298,10 +298,10 @@ func pushUpdate(branch string, opts PushUpdateOptions) (repo *Repository, err er
}
var (
baseBranch *Branch
headBranch *Branch
baseCommit *git.Commit
headCommit *git.Commit
baseBranch *Branch
headBranch *Branch
baseCommit *git.Commit
headCommit *git.Commit
headGitRepo *git.Repository
)
if baseBranch, err = pr.BaseRepo.GetBranch(pr.BaseBranch); err != nil {