Skip to content

Commit

Permalink
fix(api): fix getCommits when remote is different than the default one (
Browse files Browse the repository at this point in the history
#3285)

Signed-off-by: Benjamin Coenen <benjamin.coenen@corp.ovh.com>
  • Loading branch information
bnjjj authored and fsamin committed Sep 3, 2018
1 parent 7fedd84 commit 7d4be95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/api/workflow_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ func (api *API) getWorkflowCommitsHandler() service.Handler {
key := vars["key"]
name := vars["permWorkflowName"]
nodeName := vars["nodeName"]
remote := FormString(r, "remote")
branch := FormString(r, "branch")
hash := FormString(r, "hash")
number, err := requestVarInt(r, "number")
Expand Down Expand Up @@ -466,6 +467,9 @@ func (api *API) getWorkflowCommitsHandler() service.Handler {
if branch != "" {
wfNodeRun.VCSBranch = branch
}
if remote != "" {
wfNodeRun.VCSRepository = remote
}
if hash != "" {
wfNodeRun.VCSHash = hash
} else if wNode != nil && errW == nil && wNode.ID != wfRun.Workflow.Root.ID {
Expand Down

0 comments on commit 7d4be95

Please sign in to comment.