Skip to main content

Enterprise Server 3.21 ist derzeit als Release Candidate verfügbar.

Reference documentation for GraphQL schema types in the Branches category.

Mutations

createBranchProtectionRule

Mutation

Create a new branch protection rule.

Eingabefelder für createBranchProtectionRule

Rückgabefelder für createBranchProtectionRule

NameBESCHREIBUNG

branchProtectionRule (BranchProtectionRule)

The newly created BranchProtectionRule.

clientMutationId (String)

A unique identifier for the client performing the mutation.

deleteBranchProtectionRule

Mutation

Delete a branch protection rule.

Eingabefelder für deleteBranchProtectionRule

Rückgabefelder für deleteBranchProtectionRule

NameBESCHREIBUNG

clientMutationId (String)

A unique identifier for the client performing the mutation.

mergeBranch

Mutation

Merge a head into a branch.

Eingabefelder für mergeBranch

Rückgabefelder für mergeBranch

NameBESCHREIBUNG

clientMutationId (String)

A unique identifier for the client performing the mutation.

mergeCommit (Commit)

The resulting merge Commit.

updateBranchProtectionRule

Mutation

Update a branch protection rule.

Eingabefelder für updateBranchProtectionRule

Rückgabefelder für updateBranchProtectionRule

NameBESCHREIBUNG

branchProtectionRule (BranchProtectionRule)

The newly created BranchProtectionRule.

clientMutationId (String)

A unique identifier for the client performing the mutation.

Objects

BranchNamePatternParameters

Object

Parameters to be used for the branch_name_pattern rule.

Felder für BranchNamePatternParameters

NameBESCHREIBUNG

name (String)

How this rule appears when configuring it.

negate (Boolean!)

If true, the rule will fail if the pattern matches.

operator (String!)

The operator to use for matching.

pattern (String!)

The pattern to match with.

BranchProtectionRule

Object

A branch protection rule.

BranchProtectionRule Wird implementiert

Felder für BranchProtectionRule

NameBESCHREIBUNG

allowsDeletions (Boolean!)

Can this branch be deleted.

allowsForcePushes (Boolean!)

Are force pushes allowed on this branch.

blocksCreations (Boolean!)

Is branch creation a protected operation.

branchProtectionRuleConflicts (BranchProtectionRuleConflictConnection!)

A list of conflicts matching branches protection rule and other branch protection rules.

Argumente für branchProtectionRuleConflicts

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

bypassForcePushAllowances (BypassForcePushAllowanceConnection!)

A list of actors able to force push for this branch protection rule.

Argumente für bypassForcePushAllowances

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

bypassPullRequestAllowances (BypassPullRequestAllowanceConnection!)

A list of actors able to bypass PRs for this branch protection rule.

Argumente für bypassPullRequestAllowances

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

creator (Actor)

The actor who created this branch protection rule.

databaseId (Int)

Identifies the primary key from the database.

dismissesStaleReviews (Boolean!)

Will new commits pushed to matching branches dismiss pull request review approvals.

id (ID!)

The Node ID of the BranchProtectionRule object.

isAdminEnforced (Boolean!)

Can admins override branch protection.

lockAllowsFetchAndMerge (Boolean!)

Whether users can pull changes from upstream when the branch is locked. Set to true to allow fork syncing. Set to false to prevent fork syncing.

lockBranch (Boolean!)

Whether to set the branch as read-only. If this is true, users will not be able to push to the branch.

matchingRefs (RefConnection!)

Repository refs that are protected by this rule.

Argumente für matchingRefs

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

  • query (String)

    Filters refs with query on name.

pattern (String!)

Identifies the protection rule pattern.

pushAllowances (PushAllowanceConnection!)

A list push allowances for this branch protection rule.

Argumente für pushAllowances

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

repository (Repository)

The repository associated with this branch protection rule.

requireLastPushApproval (Boolean!)

Whether the most recent push must be approved by someone other than the person who pushed it.

requiredApprovingReviewCount (Int)

Number of approving reviews required to update matching branches.

requiredDeploymentEnvironments ([String])

List of required deployment environments that must be deployed successfully to update matching branches.

requiredStatusCheckContexts ([String])

List of required status check contexts that must pass for commits to be accepted to matching branches.

requiredStatusChecks ([RequiredStatusCheckDescription!])

List of required status checks that must pass for commits to be accepted to matching branches.

requiresApprovingReviews (Boolean!)

Are approving reviews required to update matching branches.

requiresCodeOwnerReviews (Boolean!)

Are reviews from code owners required to update matching branches.

requiresCommitSignatures (Boolean!)

Are commits required to be signed.

requiresConversationResolution (Boolean!)

Are conversations required to be resolved before merging.

requiresDeployments (Boolean!)

Does this branch require deployment to specific environments before merging.

requiresLinearHistory (Boolean!)

Are merge commits prohibited from being pushed to this branch.

requiresStatusChecks (Boolean!)

Are status checks required to update matching branches.

requiresStrictStatusChecks (Boolean!)

Are branches required to be up to date before merging.

restrictsPushes (Boolean!)

Is pushing to matching branches restricted.

restrictsReviewDismissals (Boolean!)

Is dismissal of pull request reviews restricted.

reviewDismissalAllowances (ReviewDismissalAllowanceConnection!)

A list review dismissal allowances for this branch protection rule.

Argumente für reviewDismissalAllowances

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

BranchProtectionRuleConflict

Object

A conflict between two branch protection rules.

Felder für BranchProtectionRuleConflict

NameBESCHREIBUNG

branchProtectionRule (BranchProtectionRule)

Identifies the branch protection rule.

conflictingBranchProtectionRule (BranchProtectionRule)

Identifies the conflicting branch protection rule.

ref (Ref)

Identifies the branch ref that has conflicting rules.

BranchProtectionRuleConflictConnection

Object

The connection type for BranchProtectionRuleConflict.

Felder für BranchProtectionRuleConflictConnection

NameBESCHREIBUNG

edges ([BranchProtectionRuleConflictEdge])

A list of edges.

nodes ([BranchProtectionRuleConflict])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.

totalCount (Int!)

Identifies the total count of items in the connection.

BranchProtectionRuleConflictEdge

Object

An edge in a connection.

Felder für BranchProtectionRuleConflictEdge

NameBESCHREIBUNG

cursor (String!)

A cursor for use in pagination.

node (BranchProtectionRuleConflict)

The item at the end of the edge.

BranchProtectionRuleConnection

Object

The connection type for BranchProtectionRule.

Felder für BranchProtectionRuleConnection

NameBESCHREIBUNG

edges ([BranchProtectionRuleEdge])

A list of edges.

nodes ([BranchProtectionRule])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.

totalCount (Int!)

Identifies the total count of items in the connection.

BranchProtectionRuleEdge

Object

An edge in a connection.

Felder für BranchProtectionRuleEdge

NameBESCHREIBUNG

cursor (String!)

A cursor for use in pagination.

node (BranchProtectionRule)

The item at the end of the edge.

BypassForcePushAllowance

Object

A user, team, or app who has the ability to bypass a force push requirement on a protected branch.

BypassForcePushAllowance Wird implementiert

Felder für BypassForcePushAllowance

NameBESCHREIBUNG

actor (BranchActorAllowanceActor)

The actor that can force push.

branchProtectionRule (BranchProtectionRule)

Identifies the branch protection rule associated with the allowed user, team, or app.

id (ID!)

The Node ID of the BypassForcePushAllowance object.

BypassForcePushAllowanceConnection

Object

The connection type for BypassForcePushAllowance.

Felder für BypassForcePushAllowanceConnection

NameBESCHREIBUNG

edges ([BypassForcePushAllowanceEdge])

A list of edges.

nodes ([BypassForcePushAllowance])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.

totalCount (Int!)

Identifies the total count of items in the connection.

BypassForcePushAllowanceEdge

Object

An edge in a connection.

Felder für BypassForcePushAllowanceEdge

NameBESCHREIBUNG

cursor (String!)

A cursor for use in pagination.

node (BypassForcePushAllowance)

The item at the end of the edge.

BypassPullRequestAllowance

Object

A user, team, or app who has the ability to bypass a pull request requirement on a protected branch.

BypassPullRequestAllowance Wird implementiert

Felder für BypassPullRequestAllowance

NameBESCHREIBUNG

actor (BranchActorAllowanceActor)

The actor that can bypass.

branchProtectionRule (BranchProtectionRule)

Identifies the branch protection rule associated with the allowed user, team, or app.

id (ID!)

The Node ID of the BypassPullRequestAllowance object.

BypassPullRequestAllowanceConnection

Object

The connection type for BypassPullRequestAllowance.

Felder für BypassPullRequestAllowanceConnection

NameBESCHREIBUNG

edges ([BypassPullRequestAllowanceEdge])

A list of edges.

nodes ([BypassPullRequestAllowance])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.

totalCount (Int!)

Identifies the total count of items in the connection.

BypassPullRequestAllowanceEdge

Object

An edge in a connection.

Felder für BypassPullRequestAllowanceEdge

NameBESCHREIBUNG

cursor (String!)

A cursor for use in pagination.

node (BypassPullRequestAllowance)

The item at the end of the edge.

PushAllowance

Object

A team, user, or app who has the ability to push to a protected branch.

PushAllowance Wird implementiert

Felder für PushAllowance

NameBESCHREIBUNG

actor (PushAllowanceActor)

The actor that can push.

branchProtectionRule (BranchProtectionRule)

Identifies the branch protection rule associated with the allowed user, team, or app.

id (ID!)

The Node ID of the PushAllowance object.

PushAllowanceConnection

Object

The connection type for PushAllowance.

Felder für PushAllowanceConnection

NameBESCHREIBUNG

edges ([PushAllowanceEdge])

A list of edges.

nodes ([PushAllowance])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.

totalCount (Int!)

Identifies the total count of items in the connection.

PushAllowanceEdge

Object

An edge in a connection.

Felder für PushAllowanceEdge

NameBESCHREIBUNG

cursor (String!)

A cursor for use in pagination.

node (PushAllowance)

The item at the end of the edge.

RefNameConditionTarget

Object

Parameters to be used for the ref_name condition.

Felder für RefNameConditionTarget

NameBESCHREIBUNG

exclude ([String!]!)

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

include ([String!]!)

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

RequiredStatusCheckDescription

Object

Represents a required status check for a protected branch, but not any specific run of that check.

Felder für RequiredStatusCheckDescription

NameBESCHREIBUNG

app (App)

The App that must provide this status in order for it to be accepted.

context (String!)

The name of this status.

RequiredStatusChecksParameters

Object

Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.

Felder für RequiredStatusChecksParameters

NameBESCHREIBUNG

doNotEnforceOnCreate (Boolean!)

Allow repositories and branches to be created if a check would otherwise prohibit it.

requiredStatusChecks ([StatusCheckConfiguration!]!)

Status checks that are required.

strictRequiredStatusChecksPolicy (Boolean!)

Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled.

ReviewDismissalAllowance

Object

A user, team, or app who has the ability to dismiss a review on a protected branch.

ReviewDismissalAllowance Wird implementiert

Felder für ReviewDismissalAllowance

NameBESCHREIBUNG

actor (ReviewDismissalAllowanceActor)

The actor that can dismiss.

branchProtectionRule (BranchProtectionRule)

Identifies the branch protection rule associated with the allowed user, team, or app.

id (ID!)

The Node ID of the ReviewDismissalAllowance object.

ReviewDismissalAllowanceConnection

Object

The connection type for ReviewDismissalAllowance.

Felder für ReviewDismissalAllowanceConnection

NameBESCHREIBUNG

edges ([ReviewDismissalAllowanceEdge])

A list of edges.

nodes ([ReviewDismissalAllowance])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.

totalCount (Int!)

Identifies the total count of items in the connection.

ReviewDismissalAllowanceEdge

Object

An edge in a connection.

Felder für ReviewDismissalAllowanceEdge

NameBESCHREIBUNG

cursor (String!)

A cursor for use in pagination.

node (ReviewDismissalAllowance)

The item at the end of the edge.

Unions

BranchActorAllowanceActor

Union

Types which can be actors for BranchActorAllowance objects.

Mögliche Typen für BranchActorAllowanceActor

PushAllowanceActor

Union

Types that can be an actor.

Mögliche Typen für PushAllowanceActor

ReviewDismissalAllowanceActor

Union

Types that can be an actor.

Mögliche Typen für ReviewDismissalAllowanceActor

Input objects

BranchNamePatternParametersInput

Input object

Parameters to be used for the branch_name_pattern rule.

Eingabefelder für BranchNamePatternParametersInput

NameBESCHREIBUNG

name (String)

How this rule appears when configuring it.

negate (Boolean)

If true, the rule will fail if the pattern matches.

operator (String!)

The operator to use for matching.

pattern (String!)

The pattern to match with.

CreateBranchProtectionRuleInput

Input object

Autogenerated input type of CreateBranchProtectionRule.

Eingabefelder für CreateBranchProtectionRuleInput

NameBESCHREIBUNG

allowsDeletions (Boolean)

Can this branch be deleted.

allowsForcePushes (Boolean)

Are force pushes allowed on this branch.

blocksCreations (Boolean)

Is branch creation a protected operation.

bypassForcePushActorIds ([ID!])

A list of User, Team, or App IDs allowed to bypass force push targeting matching branches.

bypassPullRequestActorIds ([ID!])

A list of User, Team, or App IDs allowed to bypass pull requests targeting matching branches.

clientMutationId (String)

A unique identifier for the client performing the mutation.

dismissesStaleReviews (Boolean)

Will new commits pushed to matching branches dismiss pull request review approvals.

isAdminEnforced (Boolean)

Can admins override branch protection.

lockAllowsFetchAndMerge (Boolean)

Whether users can pull changes from upstream when the branch is locked. Set to true to allow fork syncing. Set to false to prevent fork syncing.

lockBranch (Boolean)

Whether to set the branch as read-only. If this is true, users will not be able to push to the branch.

pattern (String!)

The glob-like pattern used to determine matching branches.

pushActorIds ([ID!])

A list of User, Team, or App IDs allowed to push to matching branches.

repositoryId (ID!)

The global relay id of the repository in which a new branch protection rule should be created in.

requireLastPushApproval (Boolean)

Whether the most recent push must be approved by someone other than the person who pushed it.

requiredApprovingReviewCount (Int)

Number of approving reviews required to update matching branches.

requiredDeploymentEnvironments ([String!])

The list of required deployment environments.

requiredStatusCheckContexts ([String!])

List of required status check contexts that must pass for commits to be accepted to matching branches.

requiredStatusChecks ([RequiredStatusCheckInput!])

The list of required status checks.

requiresApprovingReviews (Boolean)

Are approving reviews required to update matching branches.

requiresCodeOwnerReviews (Boolean)

Are reviews from code owners required to update matching branches.

requiresCommitSignatures (Boolean)

Are commits required to be signed.

requiresConversationResolution (Boolean)

Are conversations required to be resolved before merging.

requiresDeployments (Boolean)

Are successful deployments required before merging.

requiresLinearHistory (Boolean)

Are merge commits prohibited from being pushed to this branch.

requiresStatusChecks (Boolean)

Are status checks required to update matching branches.

requiresStrictStatusChecks (Boolean)

Are branches required to be up to date before merging.

restrictsPushes (Boolean)

Is pushing to matching branches restricted.

restrictsReviewDismissals (Boolean)

Is dismissal of pull request reviews restricted.

reviewDismissalActorIds ([ID!])

A list of User, Team, or App IDs allowed to dismiss reviews on pull requests targeting matching branches.

DeleteBranchProtectionRuleInput

Input object

Autogenerated input type of DeleteBranchProtectionRule.

Eingabefelder für DeleteBranchProtectionRuleInput

NameBESCHREIBUNG

branchProtectionRuleId (ID!)

The global relay id of the branch protection rule to be deleted.

clientMutationId (String)

A unique identifier for the client performing the mutation.

MergeBranchInput

Input object

Autogenerated input type of MergeBranch.

Eingabefelder für MergeBranchInput

NameBESCHREIBUNG

base (String!)

The name of the base branch that the provided head will be merged into.

clientMutationId (String)

A unique identifier for the client performing the mutation.

commitMessage (String)

Message to use for the merge commit. If omitted, a default will be used.

head (String!)

The head to merge into the base branch. This can be a branch name or a commit GitObjectID.

repositoryId (ID!)

The Node ID of the Repository containing the base branch that will be modified.

RefNameConditionTargetInput

Input object

Parameters to be used for the ref_name condition.

Eingabefelder für RefNameConditionTargetInput

NameBESCHREIBUNG

exclude ([String!]!)

Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.

include ([String!]!)

Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

RequiredStatusCheckInput

Input object

Specifies the attributes for a new or updated required status check.

Eingabefelder für RequiredStatusCheckInput

NameBESCHREIBUNG

appId (ID)

The ID of the App that must set the status in order for it to be accepted. Omit this value to use whichever app has recently been setting this status, or use "any" to allow any app to set the status.

context (String!)

Status check context that must pass for commits to be accepted to the matching branch.

RequiredStatusChecksParametersInput

Input object

Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.

Eingabefelder für RequiredStatusChecksParametersInput

NameBESCHREIBUNG

doNotEnforceOnCreate (Boolean)

Allow repositories and branches to be created if a check would otherwise prohibit it.

requiredStatusChecks ([StatusCheckConfigurationInput!]!)

Status checks that are required.

strictRequiredStatusChecksPolicy (Boolean!)

Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled.

UpdateBranchProtectionRuleInput

Input object

Autogenerated input type of UpdateBranchProtectionRule.

Eingabefelder für UpdateBranchProtectionRuleInput

NameBESCHREIBUNG

allowsDeletions (Boolean)

Can this branch be deleted.

allowsForcePushes (Boolean)

Are force pushes allowed on this branch.

blocksCreations (Boolean)

Is branch creation a protected operation.

branchProtectionRuleId (ID!)

The global relay id of the branch protection rule to be updated.

bypassForcePushActorIds ([ID!])

A list of User, Team, or App IDs allowed to bypass force push targeting matching branches.

bypassPullRequestActorIds ([ID!])

A list of User, Team, or App IDs allowed to bypass pull requests targeting matching branches.

clientMutationId (String)

A unique identifier for the client performing the mutation.

dismissesStaleReviews (Boolean)

Will new commits pushed to matching branches dismiss pull request review approvals.

isAdminEnforced (Boolean)

Can admins override branch protection.

lockAllowsFetchAndMerge (Boolean)

Whether users can pull changes from upstream when the branch is locked. Set to true to allow fork syncing. Set to false to prevent fork syncing.

lockBranch (Boolean)

Whether to set the branch as read-only. If this is true, users will not be able to push to the branch.

pattern (String)

The glob-like pattern used to determine matching branches.

pushActorIds ([ID!])

A list of User, Team, or App IDs allowed to push to matching branches.

requireLastPushApproval (Boolean)

Whether the most recent push must be approved by someone other than the person who pushed it.

requiredApprovingReviewCount (Int)

Number of approving reviews required to update matching branches.

requiredDeploymentEnvironments ([String!])

The list of required deployment environments.

requiredStatusCheckContexts ([String!])

List of required status check contexts that must pass for commits to be accepted to matching branches.

requiredStatusChecks ([RequiredStatusCheckInput!])

The list of required status checks.

requiresApprovingReviews (Boolean)

Are approving reviews required to update matching branches.

requiresCodeOwnerReviews (Boolean)

Are reviews from code owners required to update matching branches.

requiresCommitSignatures (Boolean)

Are commits required to be signed.

requiresConversationResolution (Boolean)

Are conversations required to be resolved before merging.

requiresDeployments (Boolean)

Are successful deployments required before merging.

requiresLinearHistory (Boolean)

Are merge commits prohibited from being pushed to this branch.

requiresStatusChecks (Boolean)

Are status checks required to update matching branches.

requiresStrictStatusChecks (Boolean)

Are branches required to be up to date before merging.

restrictsPushes (Boolean)

Is pushing to matching branches restricted.

restrictsReviewDismissals (Boolean)

Is dismissal of pull request reviews restricted.

reviewDismissalActorIds ([ID!])

A list of User, Team, or App IDs allowed to dismiss reviews on pull requests targeting matching branches.