Skip to main content

createPublishGithubAction()

Home > @backstage/plugin-scaffolder-backend-module-github > createPublishGithubAction

Creates a new action that initializes a git repository of the content in the workspace and publishes it to GitHub.

Signature:

function createPublishGithubAction(options: {
integrations: ScmIntegrationRegistry;
config: Config;
githubCredentialsProvider?: GithubCredentialsProvider;
}): import("@backstage/plugin-scaffolder-node").TemplateAction<{
repoUrl: string;
description?: string | undefined;
homepage?: string | undefined;
access?: string | undefined;
defaultBranch?: string | undefined;
protectDefaultBranch?: boolean | undefined;
protectEnforceAdmins?: boolean | undefined;
deleteBranchOnMerge?: boolean | undefined;
gitCommitMessage?: string | undefined;
gitAuthorName?: string | undefined;
gitAuthorEmail?: string | undefined;
allowRebaseMerge?: boolean | undefined;
allowSquashMerge?: boolean | undefined;
squashMergeCommitTitle?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined;
squashMergeCommitMessage?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined;
allowMergeCommit?: boolean | undefined;
allowAutoMerge?: boolean | undefined;
sourcePath?: string | undefined;
bypassPullRequestAllowances?: {
users?: string[];
teams?: string[];
apps?: string[];
} | undefined;
requiredApprovingReviewCount?: number | undefined;
restrictions?: {
users: string[];
teams: string[];
apps?: string[];
} | undefined;
requireCodeOwnerReviews?: boolean | undefined;
dismissStaleReviews?: boolean | undefined;
requiredStatusCheckContexts?: string[] | undefined;
requireBranchesToBeUpToDate?: boolean | undefined;
requiredConversationResolution?: boolean | undefined;
requireLastPushApproval?: boolean | undefined;
repoVisibility?: "internal" | "private" | "public" | undefined;
collaborators?: ({
user: string;
access: string;
} | {
team: string;
access: string;
} | {
username: string;
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
})[] | undefined;
hasProjects?: boolean | undefined;
hasWiki?: boolean | undefined;
hasIssues?: boolean | undefined;
token?: string | undefined;
topics?: string[] | undefined;
repoVariables?: {
[key: string]: string;
} | undefined;
secrets?: {
[key: string]: string;
} | undefined;
oidcCustomization?: {
useDefault: boolean;
includeClaimKeys?: string[] | undefined;
} | undefined;
requiredCommitSigning?: boolean | undefined;
requiredLinearHistory?: boolean | undefined;
customProperties?: {
[key: string]: string;
} | undefined;
}, import("@backstage/types").JsonObject>;

Parameters

Parameter

Type

Description

options

{ integrations: ScmIntegrationRegistry; config: Config; githubCredentialsProvider?: GithubCredentialsProvider; }

**Returns:**

import("@backstage/plugin-scaffolder-node").TemplateAction<{ repoUrl: string; description?: string | undefined; homepage?: string | undefined; access?: string | undefined; defaultBranch?: string | undefined; protectDefaultBranch?: boolean | undefined; protectEnforceAdmins?: boolean | undefined; deleteBranchOnMerge?: boolean | undefined; gitCommitMessage?: string | undefined; gitAuthorName?: string | undefined; gitAuthorEmail?: string | undefined; allowRebaseMerge?: boolean | undefined; allowSquashMerge?: boolean | undefined; squashMergeCommitTitle?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined; squashMergeCommitMessage?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined; allowMergeCommit?: boolean | undefined; allowAutoMerge?: boolean | undefined; sourcePath?: string | undefined; bypassPullRequestAllowances?: { users?: string[]; teams?: string[]; apps?: string[]; } | undefined; requiredApprovingReviewCount?: number | undefined; restrictions?: { users: string[]; teams: string[]; apps?: string[]; } | undefined; requireCodeOwnerReviews?: boolean | undefined; dismissStaleReviews?: boolean | undefined; requiredStatusCheckContexts?: string[] | undefined; requireBranchesToBeUpToDate?: boolean | undefined; requiredConversationResolution?: boolean | undefined; requireLastPushApproval?: boolean | undefined; repoVisibility?: "internal" | "private" | "public" | undefined; collaborators?: ({ user: string; access: string; } | { team: string; access: string; } | { username: string; access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; })[] | undefined; hasProjects?: boolean | undefined; hasWiki?: boolean | undefined; hasIssues?: boolean | undefined; token?: string | undefined; topics?: string[] | undefined; repoVariables?: { [key: string]: string; } | undefined; secrets?: { [key: string]: string; } | undefined; oidcCustomization?: { useDefault: boolean; includeClaimKeys?: string[] | undefined; } | undefined; requiredCommitSigning?: boolean | undefined; requiredLinearHistory?: boolean | undefined; customProperties?: { [key: string]: string; } | undefined; }, import("@backstage/types").JsonObject>