Skip to content
gist.link ↗

connectProjectRepository

Mutation Deploy API — POST https://deploy.api.gist.link/graphql

Link a project to a repository and push the workspace as the initial commit. Omit repository to create one named after the project slug under the token’s account. ROLE_ADMIN or ROLE_DEPLOY_MANAGER.

deploy:mutation:connectProjectRepository

The calling IAM key must hold this permission (or a wildcard that covers it: deploy:mutation:* or deploy:*) and the access token must have been minted with audience=deploy. See Permissions.

type Mutation {
connectProjectRepository(projectId: Int!, input: ConnectProjectRepositoryInput!): Project!
}
Argument Type Required Description
projectId Int! Yes —
input ConnectProjectRepositoryInput! Yes —

Project! — see the Deploy types reference.

Terminal window
curl https://deploy.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation ConnectProjectRepository($projectId: Int!, $input: ConnectProjectRepositoryInput!) { connectProjectRepository(projectId: $projectId, input: $input) { id uuid name created_at updated_at } }",
"variables": {
"projectId": 10,
"input": {
"git_connection_id": 10
}
}
}
JSON