Version control, part 2 of 2 (GraphQL)

Related queries and mutations in Integrations and connections. Each has its own section.

Mutations

triggerGithubActionDraftPrWorkflow (mutation)

triggerGithubActionDraftPrWorkflow is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Dispatches the customer's draft-PR workflow with a finding's context

Arguments

ArgumentTypeDescription
findingUuidUUID!UUID of the finding whose context is dispatched
installationUuidUUIDInstallation to dispatch through. Optional — resolved from the finding's agent's dispatch config when omitted.

Returns

TriggerGithubActionDraftPrWorkflow

Example

mutation TriggerGithubActionDraftPrWorkflow($findingUuid: UUID!) {
  triggerGithubActionDraftPrWorkflow(findingUuid: $findingUuid) {
    success
  }
}

Types used only by triggerGithubActionDraftPrWorkflow

TriggerGithubActionDraftPrWorkflow

Object type. Dispatch the customer's draft-PR workflow with a finding's context.

Sends compact finding context (monteCarloId, title, context, source) as
workflow_dispatch inputs to the workflow configured for the finding's
agent. The customer's workflow performs the code change and opens the
draft PR with its own credentials. Fails when the finding's agent has no
dispatch target configured or the finding carries no action context.
Requires draft-PR workflow dispatch to be enabled for your account.

FieldTypeDescription
successBoolean!True when GitHub accepted the dispatch (the run itself is asynchronous)
dispatchGithubActionTriggerDispatch!Execution record created for this dispatch; follow its status via getGithubActionTriggerDispatches

Related types

GithubActionTriggerDispatch, UUID

updateAzureDevopsInstallation (mutation)

updateAzureDevopsInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Updates an Azure DevOps installation

Arguments

ArgumentTypeDescription
basicAuthCredentialsAzureDevopsBasicAuthCredentialsInputProvide either basic credentials or OAuth credentials
installationUuidUUID!Internal UUID of the installation to update
oauthCredentialsAzureDevopsOauthCredentialsInputProvide either basic credentials or OAuth credentials

Returns

UpdateAzureDevopsInstallation

Example

mutation UpdateAzureDevopsInstallation($installationUuid: UUID!) {
  updateAzureDevopsInstallation(installationUuid: $installationUuid) {
    oauthRedirectUrl
  }
}

Types used only by updateAzureDevopsInstallation

UpdateAzureDevopsInstallation

Object type.

FieldTypeDescription
installationAzureDevopsInstallationUpdated Azure DevOps installation
oauthRedirectUrlString

Related types

AzureDevopsBasicAuthCredentialsInput, AzureDevopsInstallation, AzureDevopsOauthCredentialsInput, UUID

updateCiGateConfig (mutation)

updateCiGateConfig is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Update CI gate policy for a GitHub installation

Arguments

ArgumentTypeDescription
blockOnStringWhich risk tiers cause the CI step to fail: low+, medium+, high+, or none
failOnStringDeprecated alias for blockOn. Use blockOn instead.
installationUuidUUID!UUID of the installation to configure
repoStringRepository name for a per-repo override. Omit for installation default.

Returns

UpdateCiGateConfig

Example

mutation UpdateCiGateConfig($installationUuid: UUID!) {
  updateCiGateConfig(installationUuid: $installationUuid) {
    success
  }
}

Types used only by updateCiGateConfig

UpdateCiGateConfig

Object type. Update CI gate policy configuration for a GitHub app installation.

When repo is provided, writes a per-repo override. When omitted,
writes the installation-wide default.

FieldTypeDescription
successBoolean!

Related types

UUID

updateGithubActionTriggerDispatchConfig (mutation)

updateGithubActionTriggerDispatchConfig is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Sets an agent's draft-PR dispatch target on an action-trigger app installation

Arguments

ArgumentTypeDescription
agentTraceTableMconString!Trace-table MCON of the agent this dispatch target applies to
installationUuidUUID!UUID of the installation to configure
refStringGit ref whose copy of the workflow is run (default: main) Default: "main".
repoString!Repository name without owner — the owner is the installation's organization
workflowFileString!Workflow file name in the repository, e.g. mc-draft-pr.yml

Returns

UpdateGithubActionTriggerDispatchConfig

Example

mutation UpdateGithubActionTriggerDispatchConfig($agentTraceTableMcon: String!, $installationUuid: UUID!, $repo: String!, $workflowFile: String!) {
  updateGithubActionTriggerDispatchConfig(agentTraceTableMcon: $agentTraceTableMcon, installationUuid: $installationUuid, repo: $repo, workflowFile: $workflowFile) {
    agentTraceTableMcon
  }
}

Types used only by updateGithubActionTriggerDispatchConfig

UpdateGithubActionTriggerDispatchConfig

Object type. Set which customer workflow an agent's draft-PR dispatches target.

Upserts the agent's entry on the installation — other agents' dispatch
targets are unaffected.

FieldTypeDescription
agentTraceTableMconString!Trace-table MCON of the agent the stored dispatch target applies to
dispatchConfigGithubActionTriggerDispatchConfig!The stored dispatch target

Related types

GithubActionTriggerDispatchConfig, UUID

updateGithubInstallation (mutation)

updateGithubInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Updates settings for the Github app installation

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the installation to delete
showImpactAnalysisBooleanIf true, show impacted models and reports as a PR comment

Returns

UpdateGithubAppInstallation

Example

mutation UpdateGithubInstallation($installationUuid: UUID!) {
  updateGithubInstallation(installationUuid: $installationUuid) {
    installation {
      uuid
      showImpactAnalysis
      host
      settingsLink
      ghOrg
      displayName
      prAgentEnabled
    }
  }
}

Types used only by updateGithubInstallation

UpdateGithubAppInstallation

Object type. Updates settings for the Github app installation

FieldTypeDescription
installationGithubAppInstallationUpdated installation

Related types

GithubAppInstallation, UUID

updateGitlabInstallation (mutation)

updateGitlabInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Updates a Gitlab app

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the installation to update
showImpactAnalysisBoolean!If true, show impacted models and reports as a Merge Request comment

Returns

UpdateGitlabInstallation

Example

mutation UpdateGitlabInstallation($installationUuid: UUID!, $showImpactAnalysis: Boolean!) {
  updateGitlabInstallation(installationUuid: $installationUuid, showImpactAnalysis: $showImpactAnalysis) {
    installation {
      uuid
      showImpactAnalysis
      host
      displayName
      prAgentEnabled
    }
  }
}

Types used only by updateGitlabInstallation

UpdateGitlabInstallation

Object type.

FieldTypeDescription
installationGitlabAppInstallationUpdated GitLab installation

Related types

GitlabAppInstallation, UUID

updatePrAgentConfig (mutation)

updatePrAgentConfig is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Update PR Agent configuration for a GitHub installation

Arguments

ArgumentTypeDescription
agentEnabledRepos[String!]Repos that PR Agent is allowed to review
autoReviewEnabledBooleanWhether the agent reviews newly opened pull requests in enabled repos. When false, it only runs on an "mc review" comment. Only takes effect while the account has unrestricted usage.
installationUuidUUID!UUID of the installation to configure
riskFactorWeightsPrAgentRiskFactorWeightsInputPR Risk Rubric category weights — integer percentages summing to 100.

Returns

UpdatePrAgentConfig

Example

mutation UpdatePrAgentConfig($installationUuid: UUID!) {
  updatePrAgentConfig(installationUuid: $installationUuid) {
    success
  }
}

Types used only by updatePrAgentConfig

PrAgentRiskFactorWeightsInput

Input object type. Input for setting PR Risk Rubric category weights.

All 6 fields are required because the values must sum to 100; partial
payloads are not meaningful.

FieldTypeDescription
lineageBlastRadiusInt!
assetCriticalityInt!
schemaContractInt!
codeReviewInt!
monitoringInt!
historicalSignalInt!
UpdatePrAgentConfig

Object type. Update PR Agent configuration for a GitHub app installation.

Each optional argument is independent: when its value is non-null the
field is validated and persisted; when omitted or explicitly null the
field is left unchanged. Empty list / empty input object still count as
a real value (e.g. agentEnabledRepos: [] clears the allowlist).

FieldTypeDescription
successBoolean!

Related types

UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.