ref parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify themenvironment parameter allows deployments to be issued to different runtime environments. Teams often haveproduction, staging, and qa. This parameterproduction.auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. Ifsuccessrequired_contexts parameter allows you to specify a subset of contexts that must be success, or topayload parameter is available for any extra information that a deployment system might need. It is a JSON texttask parameter is used by the deployment system to allow different execution paths. In the web world this mightdeploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile anrepo or repo_deployment scopes can create a deployment for a given ref.master in the response exampleauto_merge option is enabled and when the default branch (in this case master), can'ttopic-branch), due to merge conflicts.required_contexts parameter indicates that one or more contexts need to have a successsuccess.curl --location --request POST 'https://api.github.com/repos///deployments' \
--header 'Content-Type: application/json' \
--data-raw '{
"auto_merge": false,
"description": "Deploy request from hubot",
"payload": "{ \"deploy\": \"migrate\" }",
"ref": "topic-branch",
"required_contexts": [
"ci/janky",
"security/brakeman"
]
}'{
"message": "Auto-merged master into topic-branch on deployment."
}