(ctx context.Context, poolID ksuid.KSUID, payload api.BranchPostRequest)
| 261 | } |
| 262 | |
| 263 | func (c *Connection) CreateBranch(ctx context.Context, poolID ksuid.KSUID, payload api.BranchPostRequest) (branches.Config, error) { |
| 264 | req := c.NewRequest(ctx, http.MethodPost, path.Join("/pool", poolID.String()), payload) |
| 265 | var branch branches.Config |
| 266 | err := c.doAndUnmarshal(req, &branch) |
| 267 | if errIsStatus(err, http.StatusConflict) { |
| 268 | err = ErrBranchExists |
| 269 | } |
| 270 | return branch, err |
| 271 | } |
| 272 | |
| 273 | func (c *Connection) MergeBranch(ctx context.Context, poolID ksuid.KSUID, childBranch, parentBranch string, message api.CommitMessage) (api.CommitResponse, error) { |
| 274 | path := urlPath("pool", poolID.String(), "branch", parentBranch, "merge", childBranch) |
nothing calls this directly
no test coverage detected