Mutations
createBranchProtectionRule
Create a new branch protection rule.
输入 createBranchProtectionRule 字段
input(CreateBranchProtectionRuleInput!)
返回 createBranchProtectionRule 字段
| 名称 | 说明 |
|---|---|
| The newly created BranchProtectionRule. |
| A unique identifier for the client performing the mutation. |
deleteBranchProtectionRule
Delete a branch protection rule.
输入 deleteBranchProtectionRule 字段
input(DeleteBranchProtectionRuleInput!)
返回 deleteBranchProtectionRule 字段
| 名称 | 说明 |
|---|---|
| A unique identifier for the client performing the mutation. |
mergeBranch
Merge a head into a branch.
输入 mergeBranch 字段
input(MergeBranchInput!)
返回 mergeBranch 字段
| 名称 | 说明 |
|---|---|
| A unique identifier for the client performing the mutation. |
| The resulting merge Commit. |
updateBranchProtectionRule
Update a branch protection rule.
输入 updateBranchProtectionRule 字段
input(UpdateBranchProtectionRuleInput!)
返回 updateBranchProtectionRule 字段
| 名称 | 说明 |
|---|---|
| The newly created BranchProtectionRule. |
| A unique identifier for the client performing the mutation. |
Objects
BranchNamePatternParameters
Parameters to be used for the branch_name_pattern rule.
BranchNamePatternParameters 字段
| 名称 | 说明 |
|---|---|
| How this rule appears when configuring it. |
| If true, the rule will fail if the pattern matches. |
| The operator to use for matching. |
| The pattern to match with. |
BranchProtectionRule
A branch protection rule.
BranchProtectionRule 实现
BranchProtectionRule 字段
| 名称 | 说明 |
|---|---|
| Can this branch be deleted. |
| Are force pushes allowed on this branch. |
| Is branch creation a protected operation. |
| A list of conflicts matching branches protection rule and other branch protection rules.
|
| A list of actors able to force push for this branch protection rule.
|
| A list of actors able to bypass PRs for this branch protection rule.
|
| The actor who created this branch protection rule. |
| Identifies the primary key from the database. |
| Will new commits pushed to matching branches dismiss pull request review approvals. |
| The Node ID of the BranchProtectionRule object. |
| Can admins override branch protection. |
| Whether users can pull changes from upstream when the branch is locked. Set to
|
| Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. |
| Repository refs that are protected by this rule.
|
| Identifies the protection rule pattern. |
| A list push allowances for this branch protection rule. |
| The repository associated with this branch protection rule. |
| Whether the most recent push must be approved by someone other than the person who pushed it. |
| Number of approving reviews required to update matching branches. |
| List of required deployment environments that must be deployed successfully to update matching branches. |
| List of required status check contexts that must pass for commits to be accepted to matching branches. |
| List of required status checks that must pass for commits to be accepted to matching branches. |
| Are approving reviews required to update matching branches. |
| Are reviews from code owners required to update matching branches. |
| Are commits required to be signed. |
| Are conversations required to be resolved before merging. |
| Does this branch require deployment to specific environments before merging. |
| Are merge commits prohibited from being pushed to this branch. |
| Are status checks required to update matching branches. |
| Are branches required to be up to date before merging. |
| Is pushing to matching branches restricted. |
| Is dismissal of pull request reviews restricted. |
| A list review dismissal allowances for this branch protection rule.
|
BranchProtectionRuleConflict
A conflict between two branch protection rules.
BranchProtectionRuleConflict 字段
| 名称 | 说明 |
|---|---|
| Identifies the branch protection rule. |
| Identifies the conflicting branch protection rule. |
| Identifies the branch ref that has conflicting rules. |
BranchProtectionRuleConflictConnection
The connection type for BranchProtectionRuleConflict.
BranchProtectionRuleConflictConnection 字段
| 名称 | 说明 |
|---|---|
A list of edges. | |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
BranchProtectionRuleConflictEdge
An edge in a connection.
BranchProtectionRuleConflictEdge 字段
| 名称 | 说明 |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
BranchProtectionRuleConnection
The connection type for BranchProtectionRule.
BranchProtectionRuleConnection 字段
| 名称 | 说明 |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
BranchProtectionRuleEdge
An edge in a connection.
BranchProtectionRuleEdge 字段
| 名称 | 说明 |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
BypassForcePushAllowance
A user, team, or app who has the ability to bypass a force push requirement on a protected branch.
BypassForcePushAllowance 实现
BypassForcePushAllowance 字段
| 名称 | 说明 |
|---|---|
| The actor that can force push. |
| Identifies the branch protection rule associated with the allowed user, team, or app. |
| The Node ID of the BypassForcePushAllowance object. |
BypassForcePushAllowanceConnection
The connection type for BypassForcePushAllowance.
BypassForcePushAllowanceConnection 字段
| 名称 | 说明 |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
BypassForcePushAllowanceEdge
An edge in a connection.
BypassForcePushAllowanceEdge 字段
| 名称 | 说明 |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
BypassPullRequestAllowance
A user, team, or app who has the ability to bypass a pull request requirement on a protected branch.
BypassPullRequestAllowance 实现
BypassPullRequestAllowance 字段
| 名称 | 说明 |
|---|---|
| The actor that can bypass. |
| Identifies the branch protection rule associated with the allowed user, team, or app. |
| The Node ID of the BypassPullRequestAllowance object. |
BypassPullRequestAllowanceConnection
The connection type for BypassPullRequestAllowance.
BypassPullRequestAllowanceConnection 字段
| 名称 | 说明 |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
BypassPullRequestAllowanceEdge
An edge in a connection.
BypassPullRequestAllowanceEdge 字段
| 名称 | 说明 |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
PushAllowance
A team, user, or app who has the ability to push to a protected branch.
PushAllowance 实现
PushAllowance 字段
| 名称 | 说明 |
|---|---|
| The actor that can push. |
| Identifies the branch protection rule associated with the allowed user, team, or app. |
| The Node ID of the PushAllowance object. |
PushAllowanceConnection
The connection type for PushAllowance.
PushAllowanceConnection 字段
| 名称 | 说明 |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
PushAllowanceEdge
An edge in a connection.
PushAllowanceEdge 字段
| 名称 | 说明 |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
RefNameConditionTarget
Parameters to be used for the ref_name condition.
RefNameConditionTarget 字段
| 名称 | 说明 |
|---|---|
| Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. |
| Array of ref names or patterns to include. One of these patterns must match
for the condition to pass. Also accepts |
RequiredStatusCheckDescription
Represents a required status check for a protected branch, but not any specific run of that check.
RequiredStatusCheckDescription 字段
| 名称 | 说明 |
|---|---|
| The App that must provide this status in order for it to be accepted. |
| The name of this status. |
RequiredStatusChecksParameters
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.
RequiredStatusChecksParameters 字段
| 名称 | 说明 |
|---|---|
| Allow repositories and branches to be created if a check would otherwise prohibit it. |
| Status checks that are required. |
| 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
A user, team, or app who has the ability to dismiss a review on a protected branch.
ReviewDismissalAllowance 实现
ReviewDismissalAllowance 字段
| 名称 | 说明 |
|---|---|
| The actor that can dismiss. |
| Identifies the branch protection rule associated with the allowed user, team, or app. |
| The Node ID of the ReviewDismissalAllowance object. |
ReviewDismissalAllowanceConnection
The connection type for ReviewDismissalAllowance.
ReviewDismissalAllowanceConnection 字段
| 名称 | 说明 |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
ReviewDismissalAllowanceEdge
An edge in a connection.
ReviewDismissalAllowanceEdge 字段
| 名称 | 说明 |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
Unions
BranchActorAllowanceActor
Types which can be actors for BranchActorAllowance objects.
BranchActorAllowanceActor 可能类型
PushAllowanceActor
Types that can be an actor.
PushAllowanceActor 可能类型
ReviewDismissalAllowanceActor
Types that can be an actor.
ReviewDismissalAllowanceActor 可能类型
Input objects
BranchNamePatternParametersInput
Parameters to be used for the branch_name_pattern rule.
输入 BranchNamePatternParametersInput 字段
| 名称 | 说明 |
|---|---|
| How this rule appears when configuring it. |
| If true, the rule will fail if the pattern matches. |
| The operator to use for matching. |
| The pattern to match with. |
CreateBranchProtectionRuleInput
Autogenerated input type of CreateBranchProtectionRule.
输入 CreateBranchProtectionRuleInput 字段
| 名称 | 说明 |
|---|---|
| Can this branch be deleted. |
| Are force pushes allowed on this branch. |
| Is branch creation a protected operation. |
| A list of User, Team, or App IDs allowed to bypass force push targeting matching branches. |
| A list of User, Team, or App IDs allowed to bypass pull requests targeting matching branches. |
| A unique identifier for the client performing the mutation. |
| Will new commits pushed to matching branches dismiss pull request review approvals. |
| Can admins override branch protection. |
| Whether users can pull changes from upstream when the branch is locked. Set to
|
| Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. |
| The glob-like pattern used to determine matching branches. |
| A list of User, Team, or App IDs allowed to push to matching branches. |
| The global relay id of the repository in which a new branch protection rule should be created in. |
| Whether the most recent push must be approved by someone other than the person who pushed it. |
| Number of approving reviews required to update matching branches. |
| The list of required deployment environments. |
| List of required status check contexts that must pass for commits to be accepted to matching branches. |
| The list of required status checks. |
| Are approving reviews required to update matching branches. |
| Are reviews from code owners required to update matching branches. |
| Are commits required to be signed. |
| Are conversations required to be resolved before merging. |
| Are successful deployments required before merging. |
| Are merge commits prohibited from being pushed to this branch. |
| Are status checks required to update matching branches. |
| Are branches required to be up to date before merging. |
| Is pushing to matching branches restricted. |
| Is dismissal of pull request reviews restricted. |
| A list of User, Team, or App IDs allowed to dismiss reviews on pull requests targeting matching branches. |
DeleteBranchProtectionRuleInput
Autogenerated input type of DeleteBranchProtectionRule.
输入 DeleteBranchProtectionRuleInput 字段
| 名称 | 说明 |
|---|---|
| The global relay id of the branch protection rule to be deleted. |
| A unique identifier for the client performing the mutation. |
MergeBranchInput
Autogenerated input type of MergeBranch.
输入 MergeBranchInput 字段
| 名称 | 说明 |
|---|---|
| The email address to associate with this commit. |
| The name of the base branch that the provided head will be merged into. |
| A unique identifier for the client performing the mutation. |
| Message to use for the merge commit. If omitted, a default will be used. |
| The head to merge into the base branch. This can be a branch name or a commit GitObjectID. |
| The Node ID of the Repository containing the base branch that will be modified. |
RefNameConditionTargetInput
Parameters to be used for the ref_name condition.
输入 RefNameConditionTargetInput 字段
| 名称 | 说明 |
|---|---|
| Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. |
| Array of ref names or patterns to include. One of these patterns must match
for the condition to pass. Also accepts |
RequiredStatusCheckInput
Specifies the attributes for a new or updated required status check.
输入 RequiredStatusCheckInput 字段
| 名称 | 说明 |
|---|---|
| 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. |
| Status check context that must pass for commits to be accepted to the matching branch. |
RequiredStatusChecksParametersInput
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.
输入 RequiredStatusChecksParametersInput 字段
| 名称 | 说明 |
|---|---|
| Allow repositories and branches to be created if a check would otherwise prohibit it. |
| Status checks that are required. |
| 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
Autogenerated input type of UpdateBranchProtectionRule.
输入 UpdateBranchProtectionRuleInput 字段
| 名称 | 说明 |
|---|---|
| Can this branch be deleted. |
| Are force pushes allowed on this branch. |
| Is branch creation a protected operation. |
| The global relay id of the branch protection rule to be updated. |
| A list of User, Team, or App IDs allowed to bypass force push targeting matching branches. |
| A list of User, Team, or App IDs allowed to bypass pull requests targeting matching branches. |
| A unique identifier for the client performing the mutation. |
| Will new commits pushed to matching branches dismiss pull request review approvals. |
| Can admins override branch protection. |
| Whether users can pull changes from upstream when the branch is locked. Set to
|
| Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. |
| The glob-like pattern used to determine matching branches. |
| A list of User, Team, or App IDs allowed to push to matching branches. |
| Whether the most recent push must be approved by someone other than the person who pushed it. |
| Number of approving reviews required to update matching branches. |
| The list of required deployment environments. |
| List of required status check contexts that must pass for commits to be accepted to matching branches. |
| The list of required status checks. |
| Are approving reviews required to update matching branches. |
| Are reviews from code owners required to update matching branches. |
| Are commits required to be signed. |
| Are conversations required to be resolved before merging. |
| Are successful deployments required before merging. |
| Are merge commits prohibited from being pushed to this branch. |
| Are status checks required to update matching branches. |
| Are branches required to be up to date before merging. |
| Is pushing to matching branches restricted. |
| Is dismissal of pull request reviews restricted. |
| A list of User, Team, or App IDs allowed to dismiss reviews on pull requests targeting matching branches. |