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"}'};
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" }'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
Examplegenerated
{ "branch": "example"}object
branch
string
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