Fixed lint + gofmt
This commit is contained in:
parent
fdabcf1a25
commit
992e168687
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user