.
This commit is contained in:
parent
e9a2e0c45b
commit
6b3abaa4d6
@ -100,7 +100,7 @@ func (h *RequestHandler) CreatePullRequest(repo *models.Repository, srcId, targe
|
||||
client := apiclient.New(transport, nil)
|
||||
|
||||
var prOptions models.CreatePullRequestOption
|
||||
prOptions.Base = repo.Parent.DefaultBranch
|
||||
prOptions.Base = repo.DefaultBranch
|
||||
prOptions.Head = srcId
|
||||
|
||||
pr, err := client.Repository.RepoCreatePullRequest(
|
||||
|
@ -43,7 +43,7 @@ PullRequest: %s#%d`, req.Repository.Name, GitAuthor, req.Repository.Name, req.Pu
|
||||
h.GitExec(path.Join(common.DefaultGitPrj, req.Repository.Name), "fetch", "--depth", "1", "origin", req.Pull_Request.Head.Sha)
|
||||
h.GitExec(path.Join(common.DefaultGitPrj, req.Repository.Name), "checkout", req.Pull_Request.Head.Sha)
|
||||
h.GitExec(common.DefaultGitPrj, "commit", "-a", "-m", commitMsg)
|
||||
h.GitExec(common.DefaultGitPrj, "push", "origin", branchName)
|
||||
h.GitExec(common.DefaultGitPrj, "push", "-f", "origin", branchName)
|
||||
|
||||
PR := h.CreatePullRequest(prjGit, branchName, prjGit.DefaultBranch)
|
||||
if h.HasError() {
|
||||
|
Loading…
Reference in New Issue
Block a user