Fixed lint + gofmt

This commit is contained in:
kolaente 2018-01-14 21:14:42 +01:00 committed by Konrad
parent fdabcf1a25
commit 992e168687
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 8 additions and 8 deletions

View File

@ -470,13 +470,13 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
continue
}
if err = issue.ChangeStatus(doer, repo, true); err != nil {
// Don't return an error when dependencies are open as this would let the push fail
if IsErrDependenciesLeft(err) {
return nil
}
return err
if err = issue.ChangeStatus(doer, repo, true); err != nil {
// Don't return an error when dependencies are open as this would let the push fail
if IsErrDependenciesLeft(err) {
return nil
}
return err
}
}
// It is conflict to have close and reopen at same time, so refsMarked doesn't need to reinit here.

View File

@ -1230,10 +1230,10 @@ func (err ErrCircularDependency) Error() string {
// ErrDependenciesLeft represents an error where the issue you're trying to close still has dependencies left.
type ErrDependenciesLeft struct {
IssueID int64
IssueID int64
}
// IsErrCircularDependency checks if an error is a ErrCircularDependency.
// IsErrDependenciesLeft checks if an error is a ErrCircularDependency.
func IsErrDependenciesLeft(err error) bool {
_, ok := err.(ErrDependenciesLeft)
return ok