Jobs /
Get job pull requests
Gets information about the pull-requests of the given job.
Required permission
Project > Jobs > General > Read
Path parameters
projectId
string requiredID of the projectjobId
string requiredID of the job
Query parameters
per_page
integerThe number of results to display per request. Maximum of 100 results per page.page
integerThe page number to access.cursor
stringThe cursor returned from the previous page of results, used to request the next page.
Response body
- {object}Response object.
data
{object} requiredResult data.pullRequests
[array]A list of pull requests for this repository.- {object}Details about a pull request.
id
integer requiredID number of the pull request.state
string requiredStatus of the pull request.title
string requiredTitle of the pull request.source
string requiredName of the branch the pull request is merging from.destination
string requiredName of the branch the pull request is being merged into.sha
string requiredSHA of the most recent commit of the pull request.created_at
string requiredThe timestamp the pull request was opened.updated_at
string requiredThe timestamp the pull request was last updated at.html_url
string requiredpagination
{object} requiredData about the endpoint pagination.hasNextPage
boolean requiredIs there another page of results available?cursor
stringThe cursor to access the next page of results.count
number requiredThe number of results returned by this request.
API
CLI
JS Client
GET /v1/projects/{projectId}/jobs/{jobId}/pull-requests
Example response
200 OK
Data about the job's available pull requests.
JSON
{
"data": {
"pullRequests": [
{
"id": 1,
"state": "OPEN",
"title": "Add new feature handling",
"source": "feature/new-feature",
"destination": "main",
"sha": "4f101d8821aeb3e4f81f95f3e886a2759ba7b9db",
"created_at": "2021-03-22T11:05:52.000Z",
"updated_at": "2021-05-11T16:05:43.000Z"
}
]
},
"pagination": {
"hasNextPage": false,
"count": 1
}
}