Fixing build process by syncing govendor dependencies and gofmt.
Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
parent
05ad1bb4a8
commit
fe6c1a9ae2
|
|
@ -473,7 +473,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for dependencies, if there aren't any, close it
|
// Check for dependencies, if there aren't any, close it
|
||||||
canbeClosed := IssueNoDependenciesLeft(issue)
|
canbeClosed := IssueNoDependenciesLeft(issue.ID)
|
||||||
|
|
||||||
if canbeClosed {
|
if canbeClosed {
|
||||||
if err = issue.ChangeStatus(doer, repo, true); err != nil {
|
if err = issue.ChangeStatus(doer, repo, true); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
|
||||||
OldTitle: opts.OldTitle,
|
OldTitle: opts.OldTitle,
|
||||||
NewTitle: opts.NewTitle,
|
NewTitle: opts.NewTitle,
|
||||||
DependentIssue: opts.DependentIssue,
|
DependentIssue: opts.DependentIssue,
|
||||||
DependentIssueID: opts.DependentIssue.ID,
|
DependentIssueID: depId,
|
||||||
}
|
}
|
||||||
|
|
||||||
//fmt.Println(comment)
|
//fmt.Println(comment)
|
||||||
|
|
|
||||||
|
|
@ -699,7 +699,7 @@ func (repo *Repository) BlockedByDependencies(issueID int64) (_ []*Issue, err e
|
||||||
issueDeps, err := repo.getBlockedByDependencies(x, issueID)
|
issueDeps, err := repo.getBlockedByDependencies(x, issueID)
|
||||||
var issueDepsFull = make([]*Issue, 0)
|
var issueDepsFull = make([]*Issue, 0)
|
||||||
|
|
||||||
for _, issueDep := range issueDeps{
|
for _, issueDep := range issueDeps {
|
||||||
issueDetails, _ := getIssueByID(x, issueDep.DependencyID)
|
issueDetails, _ := getIssueByID(x, issueDep.DependencyID)
|
||||||
issueDepsFull = append(issueDepsFull, issueDetails)
|
issueDepsFull = append(issueDepsFull, issueDetails)
|
||||||
}
|
}
|
||||||
|
|
@ -716,7 +716,7 @@ func (repo *Repository) BlockingDependencies(issueID int64) (_ []*Issue, err er
|
||||||
issueDeps, err := repo.getBlockingDependencies(x, issueID)
|
issueDeps, err := repo.getBlockingDependencies(x, issueID)
|
||||||
var issueDepsFull = make([]*Issue, 0)
|
var issueDepsFull = make([]*Issue, 0)
|
||||||
|
|
||||||
for _, issueDep := range issueDeps{
|
for _, issueDep := range issueDeps {
|
||||||
issueDetails, _ := getIssueByID(x, issueDep.IssueID)
|
issueDetails, _ := getIssueByID(x, issueDep.IssueID)
|
||||||
issueDepsFull = append(issueDepsFull, issueDetails)
|
issueDepsFull = append(issueDepsFull, issueDetails)
|
||||||
}
|
}
|
||||||
|
|
@ -727,6 +727,7 @@ func (repo *Repository) BlockingDependencies(issueID int64) (_ []*Issue, err er
|
||||||
|
|
||||||
return issueDepsFull, nil
|
return issueDepsFull, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NextIssueIndex returns the next issue index
|
// NextIssueIndex returns the next issue index
|
||||||
// FIXME: should have a mutex to prevent producing same index for two issues that are created
|
// FIXME: should have a mutex to prevent producing same index for two issues that are created
|
||||||
// closely enough.
|
// closely enough.
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ func (r *RepoUnit) ExternalTrackerConfig() *ExternalTrackerConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
// IssueDependenciesConfig returns config for UnitTypeIssueDependencies
|
// IssueDependenciesConfig returns config for UnitTypeIssueDependencies
|
||||||
func (r *RepoUnit) IssueDependenciesConfig() *UnitConfig{
|
func (r *RepoUnit) IssueDependenciesConfig() *UnitConfig {
|
||||||
return r.Config.(*UnitConfig)
|
return r.Config.(*UnitConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,6 @@ type RepoSettingForm struct {
|
||||||
TrackerURLFormat string
|
TrackerURLFormat string
|
||||||
TrackerIssueStyle string
|
TrackerIssueStyle string
|
||||||
EnablePulls bool
|
EnablePulls bool
|
||||||
EnableIssueDependencies bool
|
|
||||||
EnableTimetracker bool
|
EnableTimetracker bool
|
||||||
AllowOnlyContributorsToTrackTime bool
|
AllowOnlyContributorsToTrackTime bool
|
||||||
EnableIssueDependencies bool
|
EnableIssueDependencies bool
|
||||||
|
|
|
||||||
|
|
@ -684,8 +684,8 @@ func ViewIssue(ctx *context.Context) {
|
||||||
ctx.Handle(500, "LoadAssignees", err)
|
ctx.Handle(500, "LoadAssignees", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else if comment.Type == models.CommentTypeRemovedDependency || comment.Type == models.CommentTypeAddedDependency{
|
} else if comment.Type == models.CommentTypeRemovedDependency || comment.Type == models.CommentTypeAddedDependency {
|
||||||
if err = comment.LoadDepIssueDetails(); err != nil{
|
if err = comment.LoadDepIssueDetails(); err != nil {
|
||||||
ctx.Handle(http.StatusInternalServerError, "LoadDepIssueDetails", err)
|
ctx.Handle(http.StatusInternalServerError, "LoadDepIssueDetails", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -920,12 +920,12 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) {
|
||||||
!(issue.IsPull && issue.PullRequest.HasMerged) {
|
!(issue.IsPull && issue.PullRequest.HasMerged) {
|
||||||
|
|
||||||
// Check for open dependencies
|
// Check for open dependencies
|
||||||
if form.Status == "close"{
|
if form.Status == "close" {
|
||||||
|
|
||||||
canbeClosed := models.IssueNoDependenciesLeft(issue)
|
canbeClosed := models.IssueNoDependenciesLeft(issue.ID)
|
||||||
|
|
||||||
if !canbeClosed {
|
if !canbeClosed {
|
||||||
if issue.IsPull{
|
if issue.IsPull {
|
||||||
ctx.Flash.Error("You need to close all issues blocking this pull request before you can merge it!")
|
ctx.Flash.Error("You need to close all issues blocking this pull request before you can merge it!")
|
||||||
ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
|
ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ func AddDependency(c *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if issue and dependency is the same
|
// Check if issue and dependency is the same
|
||||||
if dep.Index == issueIndex{
|
if dep.Index == issueIndex {
|
||||||
c.Flash.Error(c.Tr("issues.dependency.add_error_same_issue"))
|
c.Flash.Error(c.Tr("issues.dependency.add_error_same_issue"))
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ func RemoveDependency(c *context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if depType != 1 && depType != 2{
|
if depType != 1 && depType != 2 {
|
||||||
c.Handle(http.StatusBadRequest, "GetDependecyType", nil)
|
c.Handle(http.StatusBadRequest, "GetDependecyType", nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -428,7 +428,7 @@ func MergePullRequest(ctx *context.Context) {
|
||||||
|
|
||||||
pr.Issue = issue
|
pr.Issue = issue
|
||||||
pr.Issue.Repo = ctx.Repo.Repository
|
pr.Issue.Repo = ctx.Repo.Repository
|
||||||
canbeClosed := models.IssueNoDependenciesLeft(issue)
|
canbeClosed := models.IssueNoDependenciesLeft(issue.ID)
|
||||||
|
|
||||||
if !canbeClosed {
|
if !canbeClosed {
|
||||||
ctx.Flash.Error("You need to close all issues blocking this pull request before you can merge it!")
|
ctx.Flash.Error("You need to close all issues blocking this pull request before you can merge it!")
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if form.EnableIssueDependencies{
|
if form.EnableIssueDependencies {
|
||||||
units = append(units, models.RepoUnit{
|
units = append(units, models.RepoUnit{
|
||||||
RepoID: repo.ID,
|
RepoID: repo.ID,
|
||||||
Type: models.UnitTypeIssueDependencies,
|
Type: models.UnitTypeIssueDependencies,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user