Merge a branch from upstream
POST
/repos/{owner}/{repo}/merge-upstream
const url = 'https://gitea.com/api/v1/repos/example/example/merge-upstream';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"branch":"example","ff_only":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.com/api/v1/repos/example/example/merge-upstream \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "branch": "example", "ff_only": true }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
Request Body
Section titled “Request Body”object
branch
string
ff_only
boolean
Examplegenerated
{ "branch": "example", "ff_only": true}object
branch
string
ff_only
boolean
Responses
Section titled “Responses”Media typeapplication/json
object
merge_type
string
Examplegenerated
{ "merge_type": "example"}APIError is error format response
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
Media typeapplication/json