Git covers the repositories your workspace reaches through a connected Git provider, such as GitHub. List a repository's branches, with your workspace's development branch marked as the default. After you reinstall a Git provider or change Productmind's access, repair repository links so your applications, sessions, releases and channel notifications use the current connection, and see which repositories it still can't reach. See Integrations.
List remote branches for a workforce-known git repository
Proxies workforce's list_branches action on the repository's connector instance. Used by the session detail Code widget to populate the source-branch picker. The isDefault flag marks the branch whose name matches the workspace's git.developmentBranch setting.
path Parameters
workspaceIdWorkspace UUID
query Parameters
providerProvider slug (github, gitlab, bitbucket)
externalRepoIdVendor-side repository id
connectorIdIgnored - the server derives the connector instance from the repository's own record
repoUrlThe repository's URL, which names its server: two GitLab servers can both have a project with this id. Without it, the repository is found by id alone when only one server has it.
repoNameIgnored - the server derives the repository name from its own record
List remote branches for a workforce-known git repository › Responses
Branches available on the remote
Check which repositories have a branch
For each of up to 50 of the workspace's repositories, whether it has the named branch. exists is null where the repository's branches could not be read. A repository the workspace cannot reach is left out of the answer. Used to choose each repository's default branch when picking repositories to scan.
path Parameters
workspaceIdWorkspace UUID
query Parameters
branchThe branch to look for
reposThe repositories to check: a comma-separated list of repository keys, at most 50. A key is <provider>:<externalRepoId>, or gitlab@<host>:<externalRepoId> for a project on a GitLab server other than gitlab.com (the host with its port, when it has one)
Check which repositories have a branch › Responses
One entry per repository the workspace can reach
Check what a git connection can do on each application's repository
For the workspace's git connection named by instanceId, the account every repository action runs as and, for each application whose repository uses the connection, whether that account can read it, push a session's branch, open a merge request, and merge into the base branch (and if not, the lowest role that may). GitLab connections only for now: another provider answers supported: false. A connection the provider refuses outright answers with error.code (gitlab_connection_refused) and no verdicts.
path Parameters
workspaceIdWorkspace UUID
instanceIdThe connection's id
Check what a git connection can do on each application's repository › Responses
The connection's account and a verdict per repository
List the merge request webhook of each project a git connection's applications use
For the workspace's git connection named by instanceId, each GitLab project an application uses through it, those applications, and the project's merge request webhook as GitLab answers: present (it delivers to this connection), stale (it delivers to a connection of this workspace that was replaced), missing, or what stopped GitLab answering (no_permission: the connection's account cannot manage the project's webhooks, it takes Maintainer, so the webhook is added by hand; not_found; failed). disabled marks a webhook GitLab turned off after failed deliveries. Reads only. GitLab connections only: another provider answers supported: false. A connection GitLab refuses outright answers with error.code (gitlab_connection_refused) and its projects unchecked.
path Parameters
workspaceIdWorkspace UUID
instanceIdThe connection's id
List the merge request webhook of each project a git connection's applications use › Responses
Each project and its webhook
Add or re-point the merge request webhook of each project a git connection's applications use
Through the workspace's GitLab connection named by instanceId, makes each project's merge request webhook current: a missing one is added (merge request events only, SSL verification on, named Productmind), a stale one is moved onto this connection, and a present one is given Productmind's secret again. The secret is one Productmind keeps for the workspace, set as both the signing token and the secret token; it is listed among the webhook's secrets. Nothing is removed. A project whose webhooks the connection's account cannot manage answers no_permission and is added by hand. Answers the same list as the GET, with added and repointed where something changed.
path Parameters
workspaceIdWorkspace UUID
instanceIdThe connection's id
Add or re-point the merge request webhook of each project a git connection's applications use › Request Body
Add or re-point the merge request webhook of each project a git connection's applications use › Responses
Each project and its webhook, as it was left
Repoint stored connector-instance ids at the live instances
Workforce's ConnectorInstance.id is a per-row UUID: disconnecting a provider hard-deletes the row and reconnecting mints a new one, so every id Productmind snapshotted (Application repository blobs, session git-repository rows, release application snapshots, notification-channel subscriptions) starts 404-ing. This pass resolves each repository by its durable identity (its provider, its server and its repository id) and rewrites the stored id. Idempotent and cheap: fire it after any connector connect or disconnect. A repository no connected provider can currently serve keeps its existing id and is returned in unresolved rather than being rebound onto a connector that cannot see it. Then, on each live GitLab workspace connection, the merge request webhook of each project its applications use that still delivers to a replaced connection is moved onto it (webhooks).
path Parameters
workspaceIdWorkspace UUID
Repoint stored connector-instance ids at the live instances › Responses
Rebind complete