Skip to content

Commit

Permalink
fix: API merge message is optional (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopcoder authored Apr 5, 2021
1 parent 2eb68e3 commit 65cd6a2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
2 changes: 0 additions & 2 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ components:

Merge:
type: object
required:
- message
properties:
message:
type: string
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func uploader(ctx context.Context, ch chan string, repoName, contentPrefix strin
func merge(ctx context.Context) {
err := retry.Do(func() error {
resp, err := client.MergeIntoBranchWithResponse(ctx, repoName, branchName, "master", api.MergeIntoBranchJSONRequestBody{
Message: "merging all objects to master",
Message: api.StringPtr("merging all objects to master"),
})
if err != nil {
return err
Expand Down
26 changes: 24 additions & 2 deletions docs/assets/js/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ components:

Merge:
type: object
required:
- message
properties:
message:
type: string
Expand Down Expand Up @@ -1777,6 +1775,30 @@ paths:
required: true
schema:
type: string
get:
deprecated: true
tags:
- commits
operationId: logBranchCommits
summary: |
get commit log from branch.
Deprecated: replaced by logCommits by passing branch name as ref
parameters:
- $ref: "#/components/parameters/PaginationAfter"
- $ref: "#/components/parameters/PaginationAmount"
responses:
200:
description: commit log
content:
application/json:
schema:
$ref: "#/components/schemas/CommitList"
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"
post:
tags:
- commits
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2381,7 +2381,7 @@ func (c *Controller) MergeIntoBranch(w http.ResponseWriter, r *http.Request, bod
res, err := c.Catalog.Merge(ctx,
repository, destinationBranch, sourceRef,
user.Username,
body.Message,
StringValue(body.Message),
metadata)

var hookAbortErr *graveler.HookAbortError
Expand Down

0 comments on commit 65cd6a2

Please sign in to comment.