createGithubBranchProtectionAction()
Home > @backstage/plugin-scaffolder-backend-module-github
> createGithubBranchProtectionAction
Creates an github:branch-protection:create
Scaffolder action that configured Branch Protection in a Github Repository.
Signature:
function createGithubBranchProtectionAction(options: {
integrations: ScmIntegrationRegistry;
}): import("@backstage/plugin-scaffolder-node").TemplateAction<{
repoUrl: string;
branch?: string | undefined;
enforceAdmins?: boolean | undefined;
requiredApprovingReviewCount?: number | undefined;
requireCodeOwnerReviews?: boolean | undefined;
dismissStaleReviews?: boolean | undefined;
bypassPullRequestAllowances?: {
users?: string[];
teams?: string[];
apps?: string[];
} | undefined;
restrictions?: {
users: string[];
teams: string[];
apps?: string[];
} | undefined;
requiredStatusCheckContexts?: string[] | undefined;
requireBranchesToBeUpToDate?: boolean | undefined;
requiredConversationResolution?: boolean | undefined;
requireLastPushApproval?: boolean | undefined;
requiredCommitSigning?: boolean | undefined;
requiredLinearHistory?: boolean | undefined;
token?: string | undefined;
}, import("@backstage/types").JsonObject>;
Parameters
Parameter |
Type |
Description |
---|---|---|
options |
{ integrations: ScmIntegrationRegistry; } |
import("@backstage/plugin-scaffolder-node").TemplateAction<{ repoUrl: string; branch?: string | undefined; enforceAdmins?: boolean | undefined; requiredApprovingReviewCount?: number | undefined; requireCodeOwnerReviews?: boolean | undefined; dismissStaleReviews?: boolean | undefined; bypassPullRequestAllowances?: { users?: string[]; teams?: string[]; apps?: string[]; } | undefined; restrictions?: { users: string[]; teams: string[]; apps?: string[]; } | undefined; requiredStatusCheckContexts?: string[] | undefined; requireBranchesToBeUpToDate?: boolean | undefined; requiredConversationResolution?: boolean | undefined; requireLastPushApproval?: boolean | undefined; requiredCommitSigning?: boolean | undefined; requiredLinearHistory?: boolean | undefined; token?: string | undefined; }, import("@backstage/types").JsonObject>