feat: draft pr support (#165)

This commit is contained in:
Carlos Florêncio
2026-02-03 04:37:49 +00:00
committed by GitHub
parent b22e66750c
commit 7f883deb8f
7 changed files with 43 additions and 12 deletions
@@ -66,6 +66,7 @@ type GitCreatePRRequest struct {
Title string `json:"title"`
Body string `json:"body"`
BaseBranch string `json:"base_branch"`
Draft bool `json:"draft"`
}
// handleGitPull handles POST /api/v1/git/pull
@@ -331,7 +332,7 @@ func (s *Server) handleGitCreatePR(c *gin.Context) {
}
gitOp := s.procMgr.GitOperator()
result, err := gitOp.CreatePR(c.Request.Context(), req.Title, req.Body, req.BaseBranch)
result, err := gitOp.CreatePR(c.Request.Context(), req.Title, req.Body, req.BaseBranch, req.Draft)
if err != nil {
if errors.Is(err, process.ErrOperationInProgress) {
c.JSON(http.StatusConflict, process.PRCreateResult{