Pause / unpause the merging of PRs for specific base branches.
POSThttps://api.aviator.co/api/v1/branches
You can specify a glob pattern of base branches to pause or activate the Aviator queue. This ensures that you can continue merging branches to other base branches. You can override to pause / unpause all branches by using the Repository endpoint described above.
Example:
curl -X POST -H "Authorization: Bearer <aviator_token>"-H "Content-Type: application/json"-d '{ "pattern": "release-*", "repository": {"org": "aviator", "name": "av-demo-release"}, "paused": true, "paused_message": "This release branch has been paused."}'https://api.aviator.co/api/v1/branches
Get base branches and their statuses (paused / unpaused)
GEThttps://api.aviator.co/api/v1/branches
You can specify a glob pattern of base branches to fetch the status of. If not provided, it will fetch the status of all base branches for a specific repository.
Example:
{"branches": [ {"pattern":"release-*","paused":true"paused_message": "This branch is currently paused for the release" } ],"repository": {"name":"av-demo-release""org": "aviator" }}
PullRequest
Queue or Dequeue a Pull Request
POSThttps://api.aviator.co/api/v1/pull_request
curl -X POST -H "Authorization: Bearer <aviator_token>"-H "Content-Type: application/json"-d '{"action": "queue", "pull_request": {"number": 1234, "repository": {"name": "repo_name", "org": "org_name"}, "head_commit_sha":" "69f4404fda48aa2932abfbcb6956a9ccd473b17d", "affected_targets": ["targetA", "targetB"], "merge_commit_message": {"title": "This is where title goes", "body": "This is where body goes"}}}'https://api.aviator.co/api/v1/pull_request/
Request Body
{"pull_request": {"number":1234,"status":"queued","queued":true,"title":"[TASK-123] This is a new bug","author":"av_user","head_branch":"av/new_fix","base_branch":"main","repository": {"name":"av-demo","org":"aviator-co" } }}
Request to backport a PR on the specified target branch.
{"source_pull": {"number":1234,"repository": {"org":"aviator","name":"av-demo-release" } },"target_branch":"release-v1","message":"Backporting initiated for 1234 to release-v1. Check comments in the PR #1234 for the status"}
Fetch information of a PR based on the branch name or number
{
"errors": [
"mergeRules -> mergeMode -> parallelMode -> updateBeforeRequeue: value could not be parsed to a boolean",
"mergeRules -> mergeMode -> parallelMode -> checkMergeabilityToQueue: value could not be parsed to a boolean"
],
"success": false
}
Config Change
Fetch the history of config changes associated with a given repository.
GEThttps://api.aviator.co/api/v1/config/history
Returns a list of config history events as diffs of changes. repo and org must be provided.
The modified_by property contains email and gh_username. If the config was modified from the Dashboard, email of the user would be present, and if the config was modified from the GitHub repo change, a gh_username would be present. commit_sha property may also be only present if the change was made from the GitHub repository.
Analytics
Get list of analytics objects representing statistics on a daily basis.
Get live statistics about the state of the merge queue
GEThttps://api.aviator.co/api/v1/queue/stats
Currently this endpoint only reports statistics about the depth of the queue.
Query Parameters
{// Stats about the current depth of the queue."depth": {// The total number of PRs that are in the queue.// Excludes PRs that have not been queued yet or that have been// marked as blocked."queued":8,// The number of PRs actively being processed.// In serial mode, this value is always equal to the "queued" value.// In parallel mode, this will be at most the "max_parallel_builds" setting// and indicates the numbers of PRs that have draft PRs created."processing":2,// The number of PRs that are queued but not yet being processed.// In parallel mode, this is equal to queued - processing.// In serial mode, this is always zero."waiting":6 }}
User actions
This API is only available in Enterprise plan.
Fetch the actions performed by the users on the Aviator web app dashboard (audit logs). The results returned are ordered reverse chronologically.