Skip to content
Console
Menu

Alerts and status pages

App store purchases

Credits

Knowledge

KV

Notifications

Organizations

Storage

Workflows

API reference

Getting Started

Authentication

KV Store

Open git hub pull request on a trust policy

Opens a pull request as the user authorized by the policy's GitHub user Connection.

Opens a pull request as the user authorized by the policy's GitHub user Connection. Credentials remain inside Broker. Requires an exact repository, policy subject and actor, and pull_requests=write. Fork heads are refused.

  • Path POST https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy:openGitHubPullRequest
  • Scope broker:github:pull_requests:create
  • Effect write — a successful call changes state.
  • Collection trust_policies

#Request

FieldTypeWhat it is
namestringPolicy authorizing this action, not an installation-token exchange. Required.
repositorystringOne exact owner/name from the policy's repository list. Required.
headstringExisting branch in repository. Cross-fork owner:branch syntax is refused. Required.
basestringExisting target branch in repository. Required.
titlestringPull request title. Required.
bodystringPull request description.
draftboolWhether to create a draft.

#Response

FieldTypeWhat it is
numberint64Repository-local pull request number.
html_urlstringPublic GitHub pull request URL.
headGitHubPullRequestHeadResolved source revision.

#GitHubPullRequestHead

FieldTypeWhat it is
shastringFull Git object id returned by GitHub.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy:openGitHubPullRequest" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base":"…","head":"…","repository":"…","title":"…"}'