@backstage/plugin-scaffolder-backend-module-github 0.8.2-next.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/actions/gitHelpers.cjs.js.map +1 -1
- package/dist/actions/gitHubEnvironment.examples.cjs.js.map +1 -1
- package/dist/actions/github.cjs.js.map +1 -1
- package/dist/actions/github.examples.cjs.js.map +1 -1
- package/dist/actions/githubActionsDispatch.cjs.js.map +1 -1
- package/dist/actions/githubActionsDispatch.examples.cjs.js.map +1 -1
- package/dist/actions/githubAutolinks.cjs.js.map +1 -1
- package/dist/actions/githubAutolinks.examples.cjs.js.map +1 -1
- package/dist/actions/githubBranchProtection.cjs.js.map +1 -1
- package/dist/actions/githubBranchProtection.examples.cjs.js.map +1 -1
- package/dist/actions/githubDeployKey.cjs.js.map +1 -1
- package/dist/actions/githubDeployKey.examples.cjs.js.map +1 -1
- package/dist/actions/githubEnvironment.cjs.js.map +1 -1
- package/dist/actions/githubIssuesLabel.cjs.js.map +1 -1
- package/dist/actions/githubIssuesLabel.examples.cjs.js.map +1 -1
- package/dist/actions/githubPagesEnable.cjs.js.map +1 -1
- package/dist/actions/githubPagesEnable.examples.cjs.js.map +1 -1
- package/dist/actions/githubPullRequest.cjs.js.map +1 -1
- package/dist/actions/githubPullRequest.examples.cjs.js.map +1 -1
- package/dist/actions/githubRepoCreate.cjs.js.map +1 -1
- package/dist/actions/githubRepoCreate.examples.cjs.js.map +1 -1
- package/dist/actions/githubRepoPush.cjs.js.map +1 -1
- package/dist/actions/githubRepoPush.examples.cjs.js.map +1 -1
- package/dist/actions/githubWebhook.cjs.js.map +1 -1
- package/dist/actions/githubWebhook.examples.cjs.js.map +1 -1
- package/dist/actions/helpers.cjs.js.map +1 -1
- package/dist/actions/inputProperties.cjs.js +2 -2
- package/dist/actions/inputProperties.cjs.js.map +1 -1
- package/dist/actions/outputProperties.cjs.js.map +1 -1
- package/dist/autocomplete/autocomplete.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/module.cjs.js.map +1 -1
- package/dist/util.cjs.js.map +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubRepoCreate.examples.cjs.js","sources":["../../src/actions/githubRepoCreate.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Creates a GitHub repository with default configuration.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n },\n },\n ],\n }),\n },\n {\n description: 'Add a description.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with a description',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'My new repository',\n },\n },\n ],\n }),\n },\n {\n description: 'Disable wiki and issues.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository without wiki and issues',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n hasIssues: false,\n hasWiki: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Set repository homepage.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with homepage',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n homepage: 'https://example.com',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a private repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n },\n },\n ],\n }),\n },\n {\n description: 'Enable required code owner reviews.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required code owner reviews',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireCodeOwnerReviews: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Set required approving review count to 2.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required approving review count',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n {\n description: 'Allow squash merge only.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only squash merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowSquashMerge: true,\n allowRebaseMerge: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Set squash merge commit title to pull request title.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with squash merge commit title set to pull request title',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n squashMergeCommitTitle: 'pull_request_title',\n },\n },\n ],\n }),\n },\n {\n description: 'Set squash merge commit message to blank.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with squash merge commit message set to blank',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n squashMergeCommitMessage: 'blank',\n },\n },\n ],\n }),\n },\n {\n description: 'Allow auto-merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing auto-merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowAutoMerge: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Set collaborators with push access.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with collaborators having push access',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n collaborators: [\n { username: 'user1', permission: 'push' },\n { username: 'user2', permission: 'push' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Add topics to repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n topics: ['devops', 'kubernetes', 'ci-cd'],\n },\n },\n ],\n }),\n },\n {\n description: 'Add secret variables to repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with secret variables',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n secrets: [\n { name: 'SECRET_KEY', value: 'supersecretkey' },\n { name: 'API_TOKEN', value: 'tokenvalue' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Enable branch protection requiring status checks.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection requiring status checks',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: ['ci/circleci: build'],\n },\n },\n ],\n }),\n },\n {\n description: 'Require branches to be up-to-date before merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring branches to be up-to-date before merging',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireBranchesToBeUpToDate: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Require conversation resolution before merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring conversation resolution before merging',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredConversationResolution: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Delete branch on merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch deletion on merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n deleteBranchOnMerge: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Customize OIDC token.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC token customization',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: 'https://github.com',\n },\n },\n },\n ],\n }),\n },\n {\n description: 'Require commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring commit signing',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set multiple properties including description, homepage, and visibility.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with multiple properties',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'A repository for project XYZ',\n homepage: 'https://project-xyz.com',\n repoVisibility: 'internal',\n },\n },\n ],\n }),\n },\n {\n description: 'Configure branch protection with multiple settings.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection settings',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: [\n 'ci/circleci: build',\n 'ci/circleci: test',\n ],\n requireBranchesToBeUpToDate: true,\n requiredConversationResolution: true,\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository access to private and add collaborators with admin access.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository with collaborators',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n collaborators: [\n { username: 'admin1', permission: 'admin' },\n { username: 'admin2', permission: 'admin' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Enable GitHub Projects for the repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with GitHub Projects enabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n hasProjects: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Disable merge commits and allow only rebase and squash merges.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only rebase and squash merges',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowRebaseMerge: true,\n allowSquashMerge: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository access to internal with no projects and issues.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new internal GitHub repository without projects and issues',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'internal',\n hasProjects: false,\n hasIssues: false,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create repository with OIDC customization for specific audience.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC customization for specific audience',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: 'https://specific-audience.com',\n },\n },\n },\n ],\n }),\n },\n {\n description: 'Require all branches to be up-to-date before merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring all branches to be up-to-date',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireBranchesToBeUpToDate: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Set description and topics for the repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with description and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'Repository for project ABC',\n topics: ['python', 'machine-learning', 'data-science'],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to public and enable commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new public GitHub repository with commit signing required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'public',\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with collaborators and default branch protection.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with collaborators and branch protection',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n collaborators: [\n { username: 'contributor1', permission: 'write' },\n { username: 'contributor2', permission: 'write' },\n ],\n requiredStatusCheckContexts: ['ci/travis: build'],\n },\n },\n ],\n }),\n },\n {\n description: 'Add multiple secret variables.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with multiple secret variables',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n secrets: [\n { name: 'SECRET_KEY_1', value: 'value1' },\n { name: 'SECRET_KEY_2', value: 'value2' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Require a minimum of 2 approving reviews for merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with 2 required approving reviews',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable branch protection with conversation resolution required.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection and conversation resolution required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredConversationResolution: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to internal with description and homepage.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new internal GitHub repository with description and homepage',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'internal',\n description: 'Internal repository for team collaboration',\n homepage: 'https://internal.example.com',\n },\n },\n ],\n }),\n },\n {\n description: 'Disable auto-merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with auto-merge disabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowAutoMerge: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Set repository topics and enable GitHub Projects.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with topics and GitHub Projects enabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n topics: ['opensource', 'nodejs', 'api'],\n hasProjects: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a private repository with collaborators having admin and write access.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository with multiple collaborators',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n collaborators: [\n { username: 'admin1', permission: 'admin' },\n { username: 'writer1', permission: 'write' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Disable branch deletion on merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch deletion on merge disabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n deleteBranchOnMerge: false,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to internal and enable commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new internal GitHub repository with commit signing required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'internal',\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create repository with description, homepage, and required status checks.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with description, homepage, and status checks',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'Repository for web application project',\n homepage: 'https://webapp.example.com',\n requiredStatusCheckContexts: [\n 'ci/travis: build',\n 'ci/travis: lint',\n ],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable squash merges only and set commit message to pull request description.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only squash merges with commit message set to pull request description',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowSquashMerge: true,\n allowRebaseMerge: false,\n squashMergeCommitMessage: 'pull_request_description',\n },\n },\n ],\n }),\n },\n {\n description: 'Enable rebase merges only and require commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only rebase merges with commit signing required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowRebaseMerge: true,\n allowSquashMerge: false,\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create repository with OIDC customization for multiple audiences.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC customization for multiple audiences',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: ['https://audience1.com', 'https://audience2.com'],\n },\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable branch protection with required approving reviews and status checks.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection requiring approving reviews and status checks',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredApprovingReviewCount: 2,\n requiredStatusCheckContexts: [\n 'ci/circleci: build',\n 'ci/circleci: test',\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Create a public repository with topics and secret variables.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new public GitHub repository with topics and secret variables',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'public',\n topics: ['javascript', 'react', 'frontend'],\n secrets: [\n { name: 'API_KEY', value: 'apikeyvalue' },\n { name: 'DB_PASSWORD', value: 'dbpasswordvalue' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Set repository description and disable issues and wiki.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with description, and disable issues and wiki',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'Repository for backend service',\n hasIssues: false,\n hasWiki: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Enable required conversation resolution and commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required conversation resolution and commit signing',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredConversationResolution: true,\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to private and require branches to be up-to-date.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository requiring branches to be up-to-date',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n requireBranchesToBeUpToDate: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with default settings and add multiple topics.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with default settings and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n topics: ['devops', 'ci-cd', 'automation'],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Disable merge commits, enable auto-merge, and require commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository disabling merge commits, enabling auto-merge, and requiring commit signing',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowAutoMerge: true,\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with homepage, collaborators, and topics.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with homepage, collaborators, and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n homepage: 'https://example.com',\n collaborators: [\n { username: 'user1', permission: 'push' },\n { username: 'user2', permission: 'admin' },\n ],\n topics: ['opensource', 'contribution'],\n },\n },\n ],\n }),\n },\n {\n description: 'Create a repository with branch protection and description.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection and description',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: ['ci/travis: build'],\n requiredApprovingReviewCount: 1,\n description: 'Repository for microservice development',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a repository with OIDC customization and topics.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC customization and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: 'https://api.example.com',\n },\n topics: ['api', 'security'],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable required code owner reviews and branch deletion on merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required code owner reviews and branch deletion on merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireCodeOwnerReviews: true,\n deleteBranchOnMerge: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with multiple secret variables and collaborators.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with multiple secret variables and collaborators',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n secrets: [\n { name: 'API_SECRET', value: 'secretvalue' },\n { name: 'DB_USER', value: 'dbuser' },\n ],\n collaborators: [\n { username: 'dev1', permission: 'write' },\n { username: 'dev2', permission: 'push' },\n ],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable branch protection requiring status checks and conversation resolution.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection requiring status checks and conversation resolution',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: ['ci/build'],\n requiredConversationResolution: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Allow branch updates.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing branch updates',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowUpdateBranch: true,\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAmBO,MAAM,QAA8B,GAAA;AAAA,EACzC;AAAA,IACE,WAAa,EAAA,yDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,MAAQ,EAAA,oBAAA;AAAA,UACR,IAAM,EAAA,gCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA;AAAA;AACX;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,oBAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,MAAQ,EAAA,oBAAA;AAAA,UACR,IAAM,EAAA,mDAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,WAAa,EAAA;AAAA;AACf;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,0BAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,MAAQ,EAAA,oBAAA;AAAA,UACR,IAAM,EAAA,wDAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,KAAA;AAAA,YACX,OAAS,EAAA;AAAA;AACX;AACF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E,MAAQ,EAAA,oBAAA;AAAA,UACR,IAAM,EAAA,iFAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,OAAS,EAAA;AAAA,cACP,EAAE,IAAA,EAAM,YAAc,EAAA,KAAA,EAAO,aAAc,EAAA;AAAA,cAC3C,EAAE,IAAA,EAAM,SAAW,EAAA,KAAA,EAAO,QAAS;AAAA,aACrC;AAAA,YACA,aAAe,EAAA;AAAA,cACb,EAAE,QAAA,EAAU,MAAQ,EAAA,UAAA,EAAY,OAAQ,EAAA;AAAA,cACxC,EAAE,QAAA,EAAU,MAAQ,EAAA,UAAA,EAAY,MAAO;AAAA;AACzC;AACF;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WACE,EAAA,+EAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,MAAQ,EAAA,oBAAA;AAAA,UACR,IAAM,EAAA,2GAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,2BAAA,EAA6B,CAAC,UAAU,CAAA;AAAA,YACxC,8BAAgC,EAAA;AAAA;AAClC;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,uBAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,MAAQ,EAAA,oBAAA;AAAA,UACR,IAAM,EAAA,wDAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,iBAAmB,EAAA;AAAA;AACrB;AACF;AACF,KACD;AAAA;AAEL;;;;"}
|
|
1
|
+
{"version":3,"file":"githubRepoCreate.examples.cjs.js","sources":["../../src/actions/githubRepoCreate.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Creates a GitHub repository with default configuration.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n },\n },\n ],\n }),\n },\n {\n description: 'Add a description.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with a description',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'My new repository',\n },\n },\n ],\n }),\n },\n {\n description: 'Disable wiki and issues.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository without wiki and issues',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n hasIssues: false,\n hasWiki: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Set repository homepage.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with homepage',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n homepage: 'https://example.com',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a private repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n },\n },\n ],\n }),\n },\n {\n description: 'Enable required code owner reviews.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required code owner reviews',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireCodeOwnerReviews: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Set required approving review count to 2.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required approving review count',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n {\n description: 'Allow squash merge only.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only squash merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowSquashMerge: true,\n allowRebaseMerge: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Set squash merge commit title to pull request title.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with squash merge commit title set to pull request title',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n squashMergeCommitTitle: 'pull_request_title',\n },\n },\n ],\n }),\n },\n {\n description: 'Set squash merge commit message to blank.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with squash merge commit message set to blank',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n squashMergeCommitMessage: 'blank',\n },\n },\n ],\n }),\n },\n {\n description: 'Allow auto-merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing auto-merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowAutoMerge: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Set collaborators with push access.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with collaborators having push access',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n collaborators: [\n { username: 'user1', permission: 'push' },\n { username: 'user2', permission: 'push' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Add topics to repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n topics: ['devops', 'kubernetes', 'ci-cd'],\n },\n },\n ],\n }),\n },\n {\n description: 'Add secret variables to repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with secret variables',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n secrets: [\n { name: 'SECRET_KEY', value: 'supersecretkey' },\n { name: 'API_TOKEN', value: 'tokenvalue' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Enable branch protection requiring status checks.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection requiring status checks',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: ['ci/circleci: build'],\n },\n },\n ],\n }),\n },\n {\n description: 'Require branches to be up-to-date before merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring branches to be up-to-date before merging',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireBranchesToBeUpToDate: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Require conversation resolution before merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring conversation resolution before merging',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredConversationResolution: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Delete branch on merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch deletion on merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n deleteBranchOnMerge: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Customize OIDC token.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC token customization',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: 'https://github.com',\n },\n },\n },\n ],\n }),\n },\n {\n description: 'Require commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring commit signing',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set multiple properties including description, homepage, and visibility.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with multiple properties',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'A repository for project XYZ',\n homepage: 'https://project-xyz.com',\n repoVisibility: 'internal',\n },\n },\n ],\n }),\n },\n {\n description: 'Configure branch protection with multiple settings.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection settings',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: [\n 'ci/circleci: build',\n 'ci/circleci: test',\n ],\n requireBranchesToBeUpToDate: true,\n requiredConversationResolution: true,\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository access to private and add collaborators with admin access.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository with collaborators',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n collaborators: [\n { username: 'admin1', permission: 'admin' },\n { username: 'admin2', permission: 'admin' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Enable GitHub Projects for the repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with GitHub Projects enabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n hasProjects: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Disable merge commits and allow only rebase and squash merges.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only rebase and squash merges',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowRebaseMerge: true,\n allowSquashMerge: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository access to internal with no projects and issues.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new internal GitHub repository without projects and issues',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'internal',\n hasProjects: false,\n hasIssues: false,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create repository with OIDC customization for specific audience.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC customization for specific audience',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: 'https://specific-audience.com',\n },\n },\n },\n ],\n }),\n },\n {\n description: 'Require all branches to be up-to-date before merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository requiring all branches to be up-to-date',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireBranchesToBeUpToDate: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Set description and topics for the repository.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with description and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'Repository for project ABC',\n topics: ['python', 'machine-learning', 'data-science'],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to public and enable commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new public GitHub repository with commit signing required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'public',\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with collaborators and default branch protection.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with collaborators and branch protection',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n collaborators: [\n { username: 'contributor1', permission: 'write' },\n { username: 'contributor2', permission: 'write' },\n ],\n requiredStatusCheckContexts: ['ci/travis: build'],\n },\n },\n ],\n }),\n },\n {\n description: 'Add multiple secret variables.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with multiple secret variables',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n secrets: [\n { name: 'SECRET_KEY_1', value: 'value1' },\n { name: 'SECRET_KEY_2', value: 'value2' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Require a minimum of 2 approving reviews for merging.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with 2 required approving reviews',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable branch protection with conversation resolution required.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection and conversation resolution required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredConversationResolution: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to internal with description and homepage.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new internal GitHub repository with description and homepage',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'internal',\n description: 'Internal repository for team collaboration',\n homepage: 'https://internal.example.com',\n },\n },\n ],\n }),\n },\n {\n description: 'Disable auto-merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with auto-merge disabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowAutoMerge: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Set repository topics and enable GitHub Projects.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with topics and GitHub Projects enabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n topics: ['opensource', 'nodejs', 'api'],\n hasProjects: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a private repository with collaborators having admin and write access.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository with multiple collaborators',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n collaborators: [\n { username: 'admin1', permission: 'admin' },\n { username: 'writer1', permission: 'write' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Disable branch deletion on merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch deletion on merge disabled',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n deleteBranchOnMerge: false,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to internal and enable commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new internal GitHub repository with commit signing required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'internal',\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create repository with description, homepage, and required status checks.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with description, homepage, and status checks',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'Repository for web application project',\n homepage: 'https://webapp.example.com',\n requiredStatusCheckContexts: [\n 'ci/travis: build',\n 'ci/travis: lint',\n ],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable squash merges only and set commit message to pull request description.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only squash merges with commit message set to pull request description',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowSquashMerge: true,\n allowRebaseMerge: false,\n squashMergeCommitMessage: 'pull_request_description',\n },\n },\n ],\n }),\n },\n {\n description: 'Enable rebase merges only and require commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing only rebase merges with commit signing required',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowRebaseMerge: true,\n allowSquashMerge: false,\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create repository with OIDC customization for multiple audiences.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC customization for multiple audiences',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: ['https://audience1.com', 'https://audience2.com'],\n },\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable branch protection with required approving reviews and status checks.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection requiring approving reviews and status checks',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredApprovingReviewCount: 2,\n requiredStatusCheckContexts: [\n 'ci/circleci: build',\n 'ci/circleci: test',\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Create a public repository with topics and secret variables.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new public GitHub repository with topics and secret variables',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'public',\n topics: ['javascript', 'react', 'frontend'],\n secrets: [\n { name: 'API_KEY', value: 'apikeyvalue' },\n { name: 'DB_PASSWORD', value: 'dbpasswordvalue' },\n ],\n },\n },\n ],\n }),\n },\n {\n description: 'Set repository description and disable issues and wiki.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with description, and disable issues and wiki',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n description: 'Repository for backend service',\n hasIssues: false,\n hasWiki: false,\n },\n },\n ],\n }),\n },\n {\n description: 'Enable required conversation resolution and commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required conversation resolution and commit signing',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredConversationResolution: true,\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Set repository visibility to private and require branches to be up-to-date.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new private GitHub repository requiring branches to be up-to-date',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n repoVisibility: 'private',\n requireBranchesToBeUpToDate: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with default settings and add multiple topics.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with default settings and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n topics: ['devops', 'ci-cd', 'automation'],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Disable merge commits, enable auto-merge, and require commit signing.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository disabling merge commits, enabling auto-merge, and requiring commit signing',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowMergeCommit: false,\n allowAutoMerge: true,\n requiredCommitSigning: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with homepage, collaborators, and topics.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with homepage, collaborators, and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n homepage: 'https://example.com',\n collaborators: [\n { username: 'user1', permission: 'push' },\n { username: 'user2', permission: 'admin' },\n ],\n topics: ['opensource', 'contribution'],\n },\n },\n ],\n }),\n },\n {\n description: 'Create a repository with branch protection and description.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection and description',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: ['ci/travis: build'],\n requiredApprovingReviewCount: 1,\n description: 'Repository for microservice development',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a repository with OIDC customization and topics.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with OIDC customization and topics',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n oidcCustomization: {\n sub: 'repo:owner/repo',\n aud: 'https://api.example.com',\n },\n topics: ['api', 'security'],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable required code owner reviews and branch deletion on merge.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with required code owner reviews and branch deletion on merge',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requireCodeOwnerReviews: true,\n deleteBranchOnMerge: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a repository with multiple secret variables and collaborators.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with multiple secret variables and collaborators',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n secrets: [\n { name: 'API_SECRET', value: 'secretvalue' },\n { name: 'DB_USER', value: 'dbuser' },\n ],\n collaborators: [\n { username: 'dev1', permission: 'write' },\n { username: 'dev2', permission: 'push' },\n ],\n },\n },\n ],\n }),\n },\n {\n description:\n 'Enable branch protection requiring status checks and conversation resolution.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository with branch protection requiring status checks and conversation resolution',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n requiredStatusCheckContexts: ['ci/build'],\n requiredConversationResolution: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Allow branch updates.',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:create',\n name: 'Create a new GitHub repository allowing branch updates',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n allowUpdateBranch: true,\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAmBO,MAAM,QAAA,GAA8B;AAAA,EACzC;AAAA,IACE,WAAA,EAAa,yDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,oBAAA;AAAA,UACR,IAAA,EAAM,gCAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS;AAAA;AACX;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,oBAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,oBAAA;AAAA,UACR,IAAA,EAAM,mDAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,WAAA,EAAa;AAAA;AACf;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,0BAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,oBAAA;AAAA,UACR,IAAA,EAAM,wDAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,SAAA,EAAW,KAAA;AAAA,YACX,OAAA,EAAS;AAAA;AACX;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,0BAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,oBAAA;AAAA,UACR,IAAA,EAAM,8CAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,QAAA,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A,YACA,aAAA,EAAe;AAAA,cACb,EAAE,QAAA,EAAU,MAAA,EAAQ,UAAA,EAAY,OAAA,EAAQ;AAAA,cACxC,EAAE,QAAA,EAAU,MAAA,EAAQ,UAAA,EAAY,MAAA;AAAO;AACzC;AACF;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EACE,+EAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,oBAAA;AAAA,UACR,IAAA,EAAM,2GAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,2BAAA,EAA6B,CAAC,UAAU,CAAA;AAAA,YACxC,8BAAA,EAAgC;AAAA;AAClC;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,uBAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,oBAAA;AAAA,UACR,IAAA,EAAM,wDAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,iBAAA,EAAmB;AAAA;AACrB;AACF;AACF,KACD;AAAA;AAEL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubRepoPush.cjs.js","sources":["../../src/actions/githubRepoPush.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { InputError } from '@backstage/errors';\nimport {\n GithubCredentialsProvider,\n ScmIntegrationRegistry,\n} from '@backstage/integration';\nimport { Octokit } from 'octokit';\nimport {\n createTemplateAction,\n parseRepoUrl,\n} from '@backstage/plugin-scaffolder-node';\nimport { initRepoPushAndProtect } from './helpers';\nimport { getOctokitOptions } from '../util';\nimport * as inputProps from './inputProperties';\nimport * as outputProps from './outputProperties';\nimport { examples } from './githubRepoPush.examples';\n\n/**\n * Creates a new action that initializes a git repository of the content in the workspace\n * and publishes it to GitHub.\n *\n * @public\n */\nexport function createGithubRepoPushAction(options: {\n integrations: ScmIntegrationRegistry;\n config: Config;\n githubCredentialsProvider?: GithubCredentialsProvider;\n}) {\n const { integrations, config, githubCredentialsProvider } = options;\n\n return createTemplateAction({\n id: 'github:repo:push',\n description:\n 'Initializes a git repository of contents in workspace and publishes it to GitHub.',\n examples,\n schema: {\n input: {\n repoUrl: inputProps.repoUrl,\n requireCodeOwnerReviews: inputProps.requireCodeOwnerReviews,\n dismissStaleReviews: inputProps.dismissStaleReviews,\n requiredStatusCheckContexts: inputProps.requiredStatusCheckContexts,\n bypassPullRequestAllowances: inputProps.bypassPullRequestAllowances,\n requiredApprovingReviewCount: inputProps.requiredApprovingReviewCount,\n restrictions: inputProps.restrictions,\n requireBranchesToBeUpToDate: inputProps.requireBranchesToBeUpToDate,\n requiredConversationResolution:\n inputProps.requiredConversationResolution,\n requireLastPushApproval: inputProps.requireLastPushApproval,\n defaultBranch: inputProps.defaultBranch,\n protectDefaultBranch: inputProps.protectDefaultBranch,\n protectEnforceAdmins: inputProps.protectEnforceAdmins,\n gitCommitMessage: inputProps.gitCommitMessage,\n gitAuthorName: inputProps.gitAuthorName,\n gitAuthorEmail: inputProps.gitAuthorEmail,\n sourcePath: inputProps.sourcePath,\n token: inputProps.token,\n requiredCommitSigning: inputProps.requiredCommitSigning,\n requiredLinearHistory: inputProps.requiredLinearHistory,\n },\n output: {\n remoteUrl: outputProps.remoteUrl,\n repoContentsUrl: outputProps.repoContentsUrl,\n commitHash: outputProps.commitHash,\n },\n },\n async handler(ctx) {\n const {\n repoUrl,\n defaultBranch = 'main',\n protectDefaultBranch = true,\n protectEnforceAdmins = true,\n gitCommitMessage = 'initial commit',\n gitAuthorName,\n gitAuthorEmail,\n requireCodeOwnerReviews = false,\n dismissStaleReviews = false,\n bypassPullRequestAllowances,\n requiredApprovingReviewCount = 1,\n restrictions,\n requiredStatusCheckContexts = [],\n requireBranchesToBeUpToDate = true,\n requiredConversationResolution = false,\n requireLastPushApproval = false,\n token: providedToken,\n requiredCommitSigning = false,\n requiredLinearHistory = false,\n } = ctx.input;\n\n const { host, owner, repo } = parseRepoUrl(repoUrl, integrations);\n\n if (!owner) {\n throw new InputError('Invalid repository owner provided in repoUrl');\n }\n\n const octokitOptions = await getOctokitOptions({\n integrations,\n credentialsProvider: githubCredentialsProvider,\n token: providedToken,\n host,\n owner,\n repo,\n });\n\n const client = new Octokit({\n ...octokitOptions,\n log: ctx.logger,\n });\n\n const targetRepo = await client.rest.repos.get({ owner, repo });\n\n const remoteUrl = targetRepo.data.clone_url;\n const repoContentsUrl = `${targetRepo.data.html_url}/blob/${defaultBranch}`;\n\n const commitHash = await ctx.checkpoint({\n key: `init.repo.publish.${owner}.${client}.${repo}`,\n fn: async () => {\n const { commitHash: hash } = await initRepoPushAndProtect(\n remoteUrl,\n octokitOptions.auth,\n ctx.workspacePath,\n ctx.input.sourcePath,\n defaultBranch,\n protectDefaultBranch,\n protectEnforceAdmins,\n owner,\n client,\n repo,\n requireCodeOwnerReviews,\n bypassPullRequestAllowances,\n requiredApprovingReviewCount,\n restrictions,\n requiredStatusCheckContexts,\n requireBranchesToBeUpToDate,\n requiredConversationResolution,\n requireLastPushApproval,\n config,\n ctx.logger,\n gitCommitMessage,\n gitAuthorName,\n gitAuthorEmail,\n dismissStaleReviews,\n requiredCommitSigning,\n requiredLinearHistory,\n );\n return hash;\n },\n });\n\n ctx.output('remoteUrl', remoteUrl);\n ctx.output('repoContentsUrl', repoContentsUrl);\n ctx.output('commitHash', commitHash);\n },\n });\n}\n"],"names":["createTemplateAction","examples","inputProps.repoUrl","inputProps.requireCodeOwnerReviews","inputProps.dismissStaleReviews","inputProps.requiredStatusCheckContexts","inputProps.bypassPullRequestAllowances","inputProps.requiredApprovingReviewCount","inputProps.restrictions","inputProps.requireBranchesToBeUpToDate","inputProps.requiredConversationResolution","inputProps.requireLastPushApproval","inputProps.defaultBranch","inputProps.protectDefaultBranch","inputProps.protectEnforceAdmins","inputProps.gitCommitMessage","inputProps.gitAuthorName","inputProps.gitAuthorEmail","inputProps.sourcePath","inputProps.token","inputProps.requiredCommitSigning","inputProps.requiredLinearHistory","outputProps.remoteUrl","outputProps.repoContentsUrl","outputProps.commitHash","parseRepoUrl","InputError","getOctokitOptions","Octokit","initRepoPushAndProtect"],"mappings":";;;;;;;;;;;AAuCO,SAAS,2BAA2B,
|
|
1
|
+
{"version":3,"file":"githubRepoPush.cjs.js","sources":["../../src/actions/githubRepoPush.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { InputError } from '@backstage/errors';\nimport {\n GithubCredentialsProvider,\n ScmIntegrationRegistry,\n} from '@backstage/integration';\nimport { Octokit } from 'octokit';\nimport {\n createTemplateAction,\n parseRepoUrl,\n} from '@backstage/plugin-scaffolder-node';\nimport { initRepoPushAndProtect } from './helpers';\nimport { getOctokitOptions } from '../util';\nimport * as inputProps from './inputProperties';\nimport * as outputProps from './outputProperties';\nimport { examples } from './githubRepoPush.examples';\n\n/**\n * Creates a new action that initializes a git repository of the content in the workspace\n * and publishes it to GitHub.\n *\n * @public\n */\nexport function createGithubRepoPushAction(options: {\n integrations: ScmIntegrationRegistry;\n config: Config;\n githubCredentialsProvider?: GithubCredentialsProvider;\n}) {\n const { integrations, config, githubCredentialsProvider } = options;\n\n return createTemplateAction({\n id: 'github:repo:push',\n description:\n 'Initializes a git repository of contents in workspace and publishes it to GitHub.',\n examples,\n schema: {\n input: {\n repoUrl: inputProps.repoUrl,\n requireCodeOwnerReviews: inputProps.requireCodeOwnerReviews,\n dismissStaleReviews: inputProps.dismissStaleReviews,\n requiredStatusCheckContexts: inputProps.requiredStatusCheckContexts,\n bypassPullRequestAllowances: inputProps.bypassPullRequestAllowances,\n requiredApprovingReviewCount: inputProps.requiredApprovingReviewCount,\n restrictions: inputProps.restrictions,\n requireBranchesToBeUpToDate: inputProps.requireBranchesToBeUpToDate,\n requiredConversationResolution:\n inputProps.requiredConversationResolution,\n requireLastPushApproval: inputProps.requireLastPushApproval,\n defaultBranch: inputProps.defaultBranch,\n protectDefaultBranch: inputProps.protectDefaultBranch,\n protectEnforceAdmins: inputProps.protectEnforceAdmins,\n gitCommitMessage: inputProps.gitCommitMessage,\n gitAuthorName: inputProps.gitAuthorName,\n gitAuthorEmail: inputProps.gitAuthorEmail,\n sourcePath: inputProps.sourcePath,\n token: inputProps.token,\n requiredCommitSigning: inputProps.requiredCommitSigning,\n requiredLinearHistory: inputProps.requiredLinearHistory,\n },\n output: {\n remoteUrl: outputProps.remoteUrl,\n repoContentsUrl: outputProps.repoContentsUrl,\n commitHash: outputProps.commitHash,\n },\n },\n async handler(ctx) {\n const {\n repoUrl,\n defaultBranch = 'main',\n protectDefaultBranch = true,\n protectEnforceAdmins = true,\n gitCommitMessage = 'initial commit',\n gitAuthorName,\n gitAuthorEmail,\n requireCodeOwnerReviews = false,\n dismissStaleReviews = false,\n bypassPullRequestAllowances,\n requiredApprovingReviewCount = 1,\n restrictions,\n requiredStatusCheckContexts = [],\n requireBranchesToBeUpToDate = true,\n requiredConversationResolution = false,\n requireLastPushApproval = false,\n token: providedToken,\n requiredCommitSigning = false,\n requiredLinearHistory = false,\n } = ctx.input;\n\n const { host, owner, repo } = parseRepoUrl(repoUrl, integrations);\n\n if (!owner) {\n throw new InputError('Invalid repository owner provided in repoUrl');\n }\n\n const octokitOptions = await getOctokitOptions({\n integrations,\n credentialsProvider: githubCredentialsProvider,\n token: providedToken,\n host,\n owner,\n repo,\n });\n\n const client = new Octokit({\n ...octokitOptions,\n log: ctx.logger,\n });\n\n const targetRepo = await client.rest.repos.get({ owner, repo });\n\n const remoteUrl = targetRepo.data.clone_url;\n const repoContentsUrl = `${targetRepo.data.html_url}/blob/${defaultBranch}`;\n\n const commitHash = await ctx.checkpoint({\n key: `init.repo.publish.${owner}.${client}.${repo}`,\n fn: async () => {\n const { commitHash: hash } = await initRepoPushAndProtect(\n remoteUrl,\n octokitOptions.auth,\n ctx.workspacePath,\n ctx.input.sourcePath,\n defaultBranch,\n protectDefaultBranch,\n protectEnforceAdmins,\n owner,\n client,\n repo,\n requireCodeOwnerReviews,\n bypassPullRequestAllowances,\n requiredApprovingReviewCount,\n restrictions,\n requiredStatusCheckContexts,\n requireBranchesToBeUpToDate,\n requiredConversationResolution,\n requireLastPushApproval,\n config,\n ctx.logger,\n gitCommitMessage,\n gitAuthorName,\n gitAuthorEmail,\n dismissStaleReviews,\n requiredCommitSigning,\n requiredLinearHistory,\n );\n return hash;\n },\n });\n\n ctx.output('remoteUrl', remoteUrl);\n ctx.output('repoContentsUrl', repoContentsUrl);\n ctx.output('commitHash', commitHash);\n },\n });\n}\n"],"names":["createTemplateAction","examples","inputProps.repoUrl","inputProps.requireCodeOwnerReviews","inputProps.dismissStaleReviews","inputProps.requiredStatusCheckContexts","inputProps.bypassPullRequestAllowances","inputProps.requiredApprovingReviewCount","inputProps.restrictions","inputProps.requireBranchesToBeUpToDate","inputProps.requiredConversationResolution","inputProps.requireLastPushApproval","inputProps.defaultBranch","inputProps.protectDefaultBranch","inputProps.protectEnforceAdmins","inputProps.gitCommitMessage","inputProps.gitAuthorName","inputProps.gitAuthorEmail","inputProps.sourcePath","inputProps.token","inputProps.requiredCommitSigning","inputProps.requiredLinearHistory","outputProps.remoteUrl","outputProps.repoContentsUrl","outputProps.commitHash","parseRepoUrl","InputError","getOctokitOptions","Octokit","initRepoPushAndProtect"],"mappings":";;;;;;;;;;;AAuCO,SAAS,2BAA2B,OAAA,EAIxC;AACD,EAAA,MAAM,EAAE,YAAA,EAAc,MAAA,EAAQ,yBAAA,EAA0B,GAAI,OAAA;AAE5D,EAAA,OAAOA,yCAAA,CAAqB;AAAA,IAC1B,EAAA,EAAI,kBAAA;AAAA,IACJ,WAAA,EACE,mFAAA;AAAA,cACFC,gCAAA;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO;AAAA,QACL,SAASC,uBAAW;AAAA,QACpB,yBAAyBC,uCAAW;AAAA,QACpC,qBAAqBC,mCAAW;AAAA,QAChC,6BAA6BC,2CAAW;AAAA,QACxC,6BAA6BC,2CAAW;AAAA,QACxC,8BAA8BC,4CAAW;AAAA,QACzC,cAAcC,4BAAW;AAAA,QACzB,6BAA6BC,2CAAW;AAAA,QACxC,gCACEC,8CAAW;AAAA,QACb,yBAAyBC,uCAAW;AAAA,QACpC,eAAeC,6BAAW;AAAA,QAC1B,sBAAsBC,oCAAW;AAAA,QACjC,sBAAsBC,oCAAW;AAAA,QACjC,kBAAkBC,gCAAW;AAAA,QAC7B,eAAeC,6BAAW;AAAA,QAC1B,gBAAgBC,8BAAW;AAAA,QAC3B,YAAYC,0BAAW;AAAA,QACvB,OAAOC,qBAAW;AAAA,QAClB,uBAAuBC,qCAAW;AAAA,QAClC,uBAAuBC;AAAW,OACpC;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,WAAWC,0BAAY;AAAA,QACvB,iBAAiBC,gCAAY;AAAA,QAC7B,YAAYC;AAAY;AAC1B,KACF;AAAA,IACA,MA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RepoPush.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Setup repo with no modifications to branch protection rules',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:push',\n name: 'Create test repo with testuser as owner.',\n input: {\n repoUrl: 'github.com?repo=test&owner=testuser',\n },\n },\n ],\n }),\n },\n {\n description: 'Setup repo with required codeowners check',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:push',\n name: 'Require codeowner branch protection rule',\n input: {\n repoUrl: 'github.com?repo=reponame&owner=owner',\n requireCodeOwnerReviews: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Change the default required number of approvals',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:push',\n name: 'Require two approvals before merging',\n input: {\n repoUrl: 'github.com?repo=reponame&owner=owner',\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAmBO,MAAM,
|
|
1
|
+
{"version":3,"file":"githubRepoPush.examples.cjs.js","sources":["../../src/actions/githubRepoPush.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Setup repo with no modifications to branch protection rules',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:push',\n name: 'Create test repo with testuser as owner.',\n input: {\n repoUrl: 'github.com?repo=test&owner=testuser',\n },\n },\n ],\n }),\n },\n {\n description: 'Setup repo with required codeowners check',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:push',\n name: 'Require codeowner branch protection rule',\n input: {\n repoUrl: 'github.com?repo=reponame&owner=owner',\n requireCodeOwnerReviews: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Change the default required number of approvals',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:repo:push',\n name: 'Require two approvals before merging',\n input: {\n repoUrl: 'github.com?repo=reponame&owner=owner',\n requiredApprovingReviewCount: 2,\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAmBO,MAAM,QAAA,GAA8B;AAAA,EACzC;AAAA,IACE,WAAA,EAAa,6DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,kBAAA;AAAA,UACR,IAAA,EAAM,0CAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS;AAAA;AACX;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,2CAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,kBAAA;AAAA,UACR,IAAA,EAAM,0CAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,sCAAA;AAAA,YACT,uBAAA,EAAyB;AAAA;AAC3B;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,iDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,kBAAA;AAAA,UACR,IAAA,EAAM,sCAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,sCAAA;AAAA,YACT,4BAAA,EAA8B;AAAA;AAChC;AACF;AACF,KACD;AAAA;AAEL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubWebhook.cjs.js","sources":["../../src/actions/githubWebhook.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n GithubCredentialsProvider,\n ScmIntegrationRegistry,\n} from '@backstage/integration';\nimport {\n createTemplateAction,\n parseRepoUrl,\n} from '@backstage/plugin-scaffolder-node';\nimport { emitterEventNames } from '@octokit/webhooks';\nimport { assertError, InputError } from '@backstage/errors';\nimport { Octokit } from 'octokit';\nimport { getOctokitOptions } from '../util';\nimport { examples } from './githubWebhook.examples';\n\n/**\n * Creates new action that creates a webhook for a repository on GitHub.\n * @public\n */\nexport function createGithubWebhookAction(options: {\n integrations: ScmIntegrationRegistry;\n defaultWebhookSecret?: string;\n githubCredentialsProvider?: GithubCredentialsProvider;\n}) {\n const { integrations, defaultWebhookSecret, githubCredentialsProvider } =\n options;\n\n const eventNames = emitterEventNames.filter(event => !event.includes('.'));\n\n return createTemplateAction({\n id: 'github:webhook',\n description: 'Creates webhook for a repository on GitHub.',\n examples,\n supportsDryRun: true,\n schema: {\n input: {\n repoUrl: z =>\n z.string({\n description:\n 'Accepts the format `github.com?repo=reponame&owner=owner` where `reponame` is the new repository name and `owner` is an organization or username',\n }),\n webhookUrl: z =>\n z.string({\n description: 'The URL to which the payloads will be delivered',\n }),\n webhookSecret: z =>\n z\n .string({\n description:\n 'Webhook secret value. The default can be provided internally in action creation',\n })\n .optional(),\n events: z =>\n z\n .union([\n z.array(z.enum(eventNames as [string, ...string[]]), {\n description:\n 'Determines what events the hook is triggered for. Default: `[push]`',\n }),\n z.array(z.literal('*'), {\n description:\n 'Determines what events the hook is triggered for. Use \"*\" for all events. Default: `[push]`',\n }),\n ])\n .default(['push'])\n .optional(),\n active: z =>\n z\n .boolean({\n description:\n 'Determines if notifications are sent when the webhook is triggered. Default: `true`',\n })\n .default(true)\n .optional(),\n contentType: z =>\n z\n .enum(['form', 'json'], {\n description:\n 'The media type used to serialize the payloads. The default is `form`',\n })\n .default('form')\n .optional(),\n insecureSsl: z =>\n z\n .boolean({\n description:\n 'Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Default `false`',\n })\n .default(false)\n .optional(),\n token: z =>\n z\n .string({\n description:\n 'The `GITHUB_TOKEN` to use for authorization to GitHub',\n })\n .optional(),\n },\n },\n async handler(ctx) {\n const {\n repoUrl,\n webhookUrl,\n webhookSecret = defaultWebhookSecret,\n events = ['push'],\n active = true,\n contentType = 'form',\n insecureSsl = false,\n token: providedToken,\n } = ctx.input;\n\n ctx.logger.info(`Creating webhook ${webhookUrl} for repo ${repoUrl}`);\n const { host, owner, repo } = parseRepoUrl(repoUrl, integrations);\n\n if (!owner) {\n throw new InputError('Invalid repository owner provided in repoUrl');\n }\n\n const octokitOptions = await getOctokitOptions({\n integrations,\n credentialsProvider: githubCredentialsProvider,\n host,\n owner,\n repo,\n token: providedToken,\n });\n const client = new Octokit({\n ...octokitOptions,\n log: ctx.logger,\n });\n\n // If this is a dry run, log and return\n if (ctx.isDryRun) {\n ctx.logger.info(`Dry run complete`);\n return;\n }\n\n try {\n const insecure_ssl = insecureSsl ? '1' : '0';\n\n await ctx.checkpoint({\n key: `create.webhhook.${owner}.${repo}.${webhookUrl}`,\n fn: async () => {\n await client.rest.repos.createWebhook({\n owner,\n repo,\n config: {\n url: webhookUrl,\n content_type: contentType,\n secret: webhookSecret,\n insecure_ssl,\n },\n events,\n active,\n });\n },\n });\n\n ctx.logger.info(`Webhook '${webhookUrl}' created successfully`);\n } catch (e) {\n assertError(e);\n ctx.logger.warn(\n `Failed: create webhook '${webhookUrl}' on repo: '${repo}', ${e.message}`,\n );\n }\n },\n });\n}\n"],"names":["emitterEventNames","createTemplateAction","examples","parseRepoUrl","InputError","getOctokitOptions","Octokit","assertError"],"mappings":";;;;;;;;;AAkCO,SAAS,0BAA0B,
|
|
1
|
+
{"version":3,"file":"githubWebhook.cjs.js","sources":["../../src/actions/githubWebhook.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n GithubCredentialsProvider,\n ScmIntegrationRegistry,\n} from '@backstage/integration';\nimport {\n createTemplateAction,\n parseRepoUrl,\n} from '@backstage/plugin-scaffolder-node';\nimport { emitterEventNames } from '@octokit/webhooks';\nimport { assertError, InputError } from '@backstage/errors';\nimport { Octokit } from 'octokit';\nimport { getOctokitOptions } from '../util';\nimport { examples } from './githubWebhook.examples';\n\n/**\n * Creates new action that creates a webhook for a repository on GitHub.\n * @public\n */\nexport function createGithubWebhookAction(options: {\n integrations: ScmIntegrationRegistry;\n defaultWebhookSecret?: string;\n githubCredentialsProvider?: GithubCredentialsProvider;\n}) {\n const { integrations, defaultWebhookSecret, githubCredentialsProvider } =\n options;\n\n const eventNames = emitterEventNames.filter(event => !event.includes('.'));\n\n return createTemplateAction({\n id: 'github:webhook',\n description: 'Creates webhook for a repository on GitHub.',\n examples,\n supportsDryRun: true,\n schema: {\n input: {\n repoUrl: z =>\n z.string({\n description:\n 'Accepts the format `github.com?repo=reponame&owner=owner` where `reponame` is the new repository name and `owner` is an organization or username',\n }),\n webhookUrl: z =>\n z.string({\n description: 'The URL to which the payloads will be delivered',\n }),\n webhookSecret: z =>\n z\n .string({\n description:\n 'Webhook secret value. The default can be provided internally in action creation',\n })\n .optional(),\n events: z =>\n z\n .union([\n z.array(z.enum(eventNames as [string, ...string[]]), {\n description:\n 'Determines what events the hook is triggered for. Default: `[push]`',\n }),\n z.array(z.literal('*'), {\n description:\n 'Determines what events the hook is triggered for. Use \"*\" for all events. Default: `[push]`',\n }),\n ])\n .default(['push'])\n .optional(),\n active: z =>\n z\n .boolean({\n description:\n 'Determines if notifications are sent when the webhook is triggered. Default: `true`',\n })\n .default(true)\n .optional(),\n contentType: z =>\n z\n .enum(['form', 'json'], {\n description:\n 'The media type used to serialize the payloads. The default is `form`',\n })\n .default('form')\n .optional(),\n insecureSsl: z =>\n z\n .boolean({\n description:\n 'Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Default `false`',\n })\n .default(false)\n .optional(),\n token: z =>\n z\n .string({\n description:\n 'The `GITHUB_TOKEN` to use for authorization to GitHub',\n })\n .optional(),\n },\n },\n async handler(ctx) {\n const {\n repoUrl,\n webhookUrl,\n webhookSecret = defaultWebhookSecret,\n events = ['push'],\n active = true,\n contentType = 'form',\n insecureSsl = false,\n token: providedToken,\n } = ctx.input;\n\n ctx.logger.info(`Creating webhook ${webhookUrl} for repo ${repoUrl}`);\n const { host, owner, repo } = parseRepoUrl(repoUrl, integrations);\n\n if (!owner) {\n throw new InputError('Invalid repository owner provided in repoUrl');\n }\n\n const octokitOptions = await getOctokitOptions({\n integrations,\n credentialsProvider: githubCredentialsProvider,\n host,\n owner,\n repo,\n token: providedToken,\n });\n const client = new Octokit({\n ...octokitOptions,\n log: ctx.logger,\n });\n\n // If this is a dry run, log and return\n if (ctx.isDryRun) {\n ctx.logger.info(`Dry run complete`);\n return;\n }\n\n try {\n const insecure_ssl = insecureSsl ? '1' : '0';\n\n await ctx.checkpoint({\n key: `create.webhhook.${owner}.${repo}.${webhookUrl}`,\n fn: async () => {\n await client.rest.repos.createWebhook({\n owner,\n repo,\n config: {\n url: webhookUrl,\n content_type: contentType,\n secret: webhookSecret,\n insecure_ssl,\n },\n events,\n active,\n });\n },\n });\n\n ctx.logger.info(`Webhook '${webhookUrl}' created successfully`);\n } catch (e) {\n assertError(e);\n ctx.logger.warn(\n `Failed: create webhook '${webhookUrl}' on repo: '${repo}', ${e.message}`,\n );\n }\n },\n });\n}\n"],"names":["emitterEventNames","createTemplateAction","examples","parseRepoUrl","InputError","getOctokitOptions","Octokit","assertError"],"mappings":";;;;;;;;;AAkCO,SAAS,0BAA0B,OAAA,EAIvC;AACD,EAAA,MAAM,EAAE,YAAA,EAAc,oBAAA,EAAsB,yBAAA,EAA0B,GACpE,OAAA;AAEF,EAAA,MAAM,UAAA,GAAaA,2BAAkB,MAAA,CAAO,CAAA,KAAA,KAAS,CAAC,KAAA,CAAM,QAAA,CAAS,GAAG,CAAC,CAAA;AAEzE,EAAA,OAAOC,yCAAA,CAAqB;AAAA,IAC1B,EAAA,EAAI,gBAAA;AAAA,IACJ,WAAA,EAAa,6CAAA;AAAA,cACbC,+BAAA;AAAA,IACA,cAAA,EAAgB,IAAA;AAAA,IAChB,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO;AAAA,QACL,OAAA,EAAS,CAAA,CAAA,KACP,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EACE;AAAA,SACH,CAAA;AAAA,QACH,UAAA,EAAY,CAAA,CAAA,KACV,CAAA,CAAE,MAAA,CAAO;AAAA,U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A,MAAA,EAAQ;AAAA,gBACN,GAAA,EAAK,UAAA;AAAA,gBACL,YAAA,EAAc,WAAA;AAAA,gBACd,MAAA,EAAQ,aAAA;AAAA,gBACR;AAAA,eACF;AAAA,cACA,MAAA;AAAA,cACA;AAAA,aACD,CAAA;AAAA,UACH;AAAA,SACD,CAAA;AAED,QAAA,GAAA,CAAI,MAAA,CAAO,IAAA,CAAK,CAAA,SAAA,EAAY,UAAU,CAAA,sBAAA,CAAwB,CAAA;AAAA,MAChE,SAAS,CAAA,EAAG;AACV,QAAAC,kBAAA,CAAY,CAAC,CAAA;AACb,QAAA,GAAA,CAAI,MAAA,CAAO,IAAA;AAAA,UACT,2BAA2B,UAAU,CAAA,YAAA,EAAe,IAAI,CAAA,GAAA,EAAM,EAAE,OAAO,CAAA;AAAA,SACzE;AAAA,MACF;AAAA,IACF;AAAA,GACD,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubWebhook.examples.cjs.js","sources":["../../src/actions/githubWebhook.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Create a GitHub webhook for a repository',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n webhookSecret: 'mysecret',\n events: ['push'],\n active: true,\n contentType: 'json',\n insecureSsl: false,\n token: 'my-github-token',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with minimal configuration',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with custom events',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n events: ['push', 'pull_request'],\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with JSON content type',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n contentType: 'json',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with insecure SSL',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n insecureSsl: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Create an inactive GitHub webhook',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n active: false,\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAkBO,MAAM,
|
|
1
|
+
{"version":3,"file":"githubWebhook.examples.cjs.js","sources":["../../src/actions/githubWebhook.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Create a GitHub webhook for a repository',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n webhookSecret: 'mysecret',\n events: ['push'],\n active: true,\n contentType: 'json',\n insecureSsl: false,\n token: 'my-github-token',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with minimal configuration',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with custom events',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n events: ['push', 'pull_request'],\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with JSON content type',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n contentType: 'json',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitHub webhook with insecure SSL',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n insecureSsl: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Create an inactive GitHub webhook',\n example: yaml.stringify({\n steps: [\n {\n action: 'github:webhook',\n name: 'Create GitHub Webhook',\n input: {\n repoUrl: 'github.com?repo=repo&owner=owner',\n webhookUrl: 'https://example.com/my-webhook',\n active: false,\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAkBO,MAAM,QAAA,GAA8B;AAAA,EACzC;AAAA,IACE,WAAA,EAAa,0CAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,gBAAA;AAAA,UACR,IAAA,EAAM,uBAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,UAAA,EAAY,gCAAA;AAAA,YACZ,aAAA,EAAe,UAAA;AAAA,YACf,MAAA,EAAQ,CAAC,MAAM,CAAA;AAAA,YACf,MAAA,EAAQ,IAAA;AAAA,YACR,WAAA,EAAa,MAAA;AAAA,YACb,WAAA,EAAa,KAAA;AAAA,YACb,KAAA,EAAO;AAAA;AACT;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,oDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,gBAAA;AAAA,UACR,IAAA,EAAM,uBAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,UAAA,EAAY;AAAA;AACd;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,4CAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,gBAAA;AAAA,UACR,IAAA,EAAM,uBAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,UAAA,EAAY,gCAAA;AAAA,YACZ,MAAA,EAAQ,CAAC,MAAA,EAAQ,cAAc;AAAA;AACjC;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,gDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,gBAAA;AAAA,UACR,IAAA,EAAM,uBAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,UAAA,EAAY,gCAAA;AAAA,YACZ,WAAA,EAAa;AAAA;AACf;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,2CAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,gBAAA;AAAA,UACR,IAAA,EAAM,uBAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,UAAA,EAAY,gCAAA;AAAA,YACZ,WAAA,EAAa;AAAA;AACf;AACF;AACF,KACD;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAA,EAAa,mCAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAA,CAAU;AAAA,MACtB,KAAA,EAAO;AAAA,QACL;AAAA,UACE,MAAA,EAAQ,gBAAA;AAAA,UACR,IAAA,EAAM,uBAAA;AAAA,UACN,KAAA,EAAO;AAAA,YACL,OAAA,EAAS,kCAAA;AAAA,YACT,UAAA,EAAY,gCAAA;AAAA,YACZ,MAAA,EAAQ;AAAA;AACV;AACF;AACF,KACD;AAAA;AAEL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.cjs.js","sources":["../../src/actions/helpers.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { assertError, NotFoundError } from '@backstage/errors';\nimport { Octokit } from 'octokit';\n\nimport {\n getRepoSourceDirectory,\n initRepoAndPush,\n} from '@backstage/plugin-scaffolder-node';\n\nimport Sodium from 'libsodium-wrappers';\nimport {\n enableBranchProtectionOnDefaultRepoBranch,\n entityRefToName,\n} from './gitHelpers';\nimport { LoggerService } from '@backstage/backend-plugin-api';\n\nexport async function createGithubRepoWithCollaboratorsAndTopics(\n client: Octokit,\n repo: string,\n owner: string,\n repoVisibility: 'private' | 'internal' | 'public' | undefined,\n description: string | undefined,\n homepage: string | undefined,\n deleteBranchOnMerge: boolean,\n allowMergeCommit: boolean,\n allowSquashMerge: boolean,\n squashMergeCommitTitle: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined,\n squashMergeCommitMessage: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' | undefined,\n allowRebaseMerge: boolean,\n allowAutoMerge: boolean,\n allowUpdateBranch: boolean,\n access: string | undefined,\n collaborators:\n | (\n | {\n user: string;\n access: string;\n }\n | {\n team: string;\n access: string;\n }\n | {\n /** @deprecated This field is deprecated in favor of team */\n username: string;\n access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';\n }\n )[]\n | undefined,\n hasProjects: boolean | undefined,\n hasWiki: boolean | undefined,\n hasIssues: boolean | undefined,\n topics: string[] | undefined,\n repoVariables: { [key: string]: string } | undefined,\n secrets: { [key: string]: string } | undefined,\n oidcCustomization:\n | {\n useDefault: boolean;\n includeClaimKeys?: string[];\n }\n | undefined,\n customProperties: { [key: string]: string } | undefined,\n subscribe: boolean | undefined,\n logger: LoggerService,\n) {\n // eslint-disable-next-line testing-library/no-await-sync-queries\n const user = await client.rest.users.getByUsername({\n username: owner,\n });\n\n if (access?.startsWith(`${owner}/`)) {\n await validateAccessTeam(client, access);\n }\n\n const repoCreationPromise =\n user.data.type === 'Organization'\n ? client.rest.repos.createInOrg({\n name: repo,\n org: owner,\n private: repoVisibility === 'private',\n // @ts-ignore https://github.com/octokit/types.ts/issues/522\n visibility: repoVisibility,\n description: description,\n delete_branch_on_merge: deleteBranchOnMerge,\n allow_merge_commit: allowMergeCommit,\n allow_squash_merge: allowSquashMerge,\n squash_merge_commit_title: squashMergeCommitTitle,\n squash_merge_commit_message: squashMergeCommitMessage,\n allow_rebase_merge: allowRebaseMerge,\n allow_auto_merge: allowAutoMerge,\n allow_update_branch: allowUpdateBranch,\n homepage: homepage,\n has_projects: hasProjects,\n has_wiki: hasWiki,\n has_issues: hasIssues,\n // Custom properties only available on org repos\n custom_properties: customProperties,\n })\n : client.rest.repos.createForAuthenticatedUser({\n name: repo,\n private: repoVisibility === 'private',\n description: description,\n delete_branch_on_merge: deleteBranchOnMerge,\n allow_merge_commit: allowMergeCommit,\n allow_squash_merge: allowSquashMerge,\n squash_merge_commit_title: squashMergeCommitTitle,\n squash_merge_commit_message: squashMergeCommitMessage,\n allow_rebase_merge: allowRebaseMerge,\n allow_auto_merge: allowAutoMerge,\n allow_update_branch: allowUpdateBranch,\n homepage: homepage,\n has_projects: hasProjects,\n has_wiki: hasWiki,\n has_issues: hasIssues,\n });\n\n let newRepo;\n\n try {\n newRepo = (await repoCreationPromise).data;\n } catch (e) {\n assertError(e);\n if (e.message === 'Resource not accessible by integration') {\n logger.warn(\n `The GitHub app or token provided may not have the required permissions to create the ${user.data.type} repository ${owner}/${repo}.`,\n );\n }\n throw new Error(\n `Failed to create the ${user.data.type} repository ${owner}/${repo}, ${e.message}`,\n );\n }\n\n if (access?.startsWith(`${owner}/`)) {\n const [, team] = access.split('/');\n await client.rest.teams.addOrUpdateRepoPermissionsInOrg({\n org: owner,\n team_slug: team,\n owner,\n repo,\n permission: 'admin',\n });\n // No need to add access if it's the person who owns the personal account\n } else if (access && access !== owner) {\n await client.rest.repos.addCollaborator({\n owner,\n repo,\n username: access,\n permission: 'admin',\n });\n }\n\n if (collaborators) {\n for (const collaborator of collaborators) {\n try {\n if ('user' in collaborator) {\n await client.rest.repos.addCollaborator({\n owner,\n repo,\n username: entityRefToName(collaborator.user),\n permission: collaborator.access,\n });\n } else if ('team' in collaborator) {\n await client.rest.teams.addOrUpdateRepoPermissionsInOrg({\n org: owner,\n team_slug: entityRefToName(collaborator.team),\n owner,\n repo,\n permission: collaborator.access,\n });\n }\n } catch (e) {\n assertError(e);\n const name = extractCollaboratorName(collaborator);\n logger.warn(\n `Skipping ${collaborator.access} access for ${name}, ${e.message}`,\n );\n }\n }\n }\n\n if (topics) {\n try {\n await client.rest.repos.replaceAllTopics({\n owner,\n repo,\n names: topics.map(t => t.toLowerCase()),\n });\n } catch (e) {\n assertError(e);\n logger.warn(`Skipping topics ${topics.join(' ')}, ${e.message}`);\n }\n }\n\n for (const [key, value] of Object.entries(repoVariables ?? {})) {\n await client.rest.actions.createRepoVariable({\n owner,\n repo,\n name: key,\n value: value,\n });\n }\n\n if (secrets) {\n const publicKeyResponse = await client.rest.actions.getRepoPublicKey({\n owner,\n repo,\n });\n\n await Sodium.ready;\n const binaryKey = Sodium.from_base64(\n publicKeyResponse.data.key,\n Sodium.base64_variants.ORIGINAL,\n );\n for (const [key, value] of Object.entries(secrets)) {\n const binarySecret = Sodium.from_string(value);\n const encryptedBinarySecret = Sodium.crypto_box_seal(\n binarySecret,\n binaryKey,\n );\n const encryptedBase64Secret = Sodium.to_base64(\n encryptedBinarySecret,\n Sodium.base64_variants.ORIGINAL,\n );\n\n await client.rest.actions.createOrUpdateRepoSecret({\n owner,\n repo,\n secret_name: key,\n encrypted_value: encryptedBase64Secret,\n key_id: publicKeyResponse.data.key_id,\n });\n }\n }\n\n if (oidcCustomization) {\n await client.request(\n 'PUT /repos/{owner}/{repo}/actions/oidc/customization/sub',\n {\n owner,\n repo,\n use_default: oidcCustomization.useDefault,\n include_claim_keys: oidcCustomization.includeClaimKeys,\n },\n );\n }\n\n if (subscribe) {\n await client.rest.activity.setRepoSubscription({\n subscribed: true,\n ignored: false,\n owner,\n repo,\n });\n }\n\n return newRepo;\n}\n\nexport async function initRepoPushAndProtect(\n remoteUrl: string,\n password: string,\n workspacePath: string,\n sourcePath: string | undefined,\n defaultBranch: string,\n protectDefaultBranch: boolean,\n protectEnforceAdmins: boolean,\n owner: string,\n client: Octokit,\n repo: string,\n requireCodeOwnerReviews: boolean,\n bypassPullRequestAllowances:\n | {\n users?: string[];\n teams?: string[];\n apps?: string[];\n }\n | undefined,\n requiredApprovingReviewCount: number,\n restrictions:\n | {\n users: string[];\n teams: string[];\n apps?: string[];\n }\n | undefined,\n requiredStatusCheckContexts: string[],\n requireBranchesToBeUpToDate: boolean,\n requiredConversationResolution: boolean,\n requireLastPushApproval: boolean,\n config: Config,\n logger: any,\n gitCommitMessage?: string,\n gitAuthorName?: string,\n gitAuthorEmail?: string,\n dismissStaleReviews?: boolean,\n requiredCommitSigning?: boolean,\n requiredLinearHistory?: boolean,\n): Promise<{ commitHash: string }> {\n const gitAuthorInfo = {\n name: gitAuthorName\n ? gitAuthorName\n : config.getOptionalString('scaffolder.defaultAuthor.name'),\n email: gitAuthorEmail\n ? gitAuthorEmail\n : config.getOptionalString('scaffolder.defaultAuthor.email'),\n };\n\n const commitMessage =\n getGitCommitMessage(gitCommitMessage, config) || 'initial commit';\n\n const commitResult = await initRepoAndPush({\n dir: getRepoSourceDirectory(workspacePath, sourcePath),\n remoteUrl,\n defaultBranch,\n auth: {\n username: 'x-access-token',\n password,\n },\n logger,\n commitMessage,\n gitAuthorInfo,\n });\n\n if (protectDefaultBranch) {\n try {\n await enableBranchProtectionOnDefaultRepoBranch({\n owner,\n client,\n repoName: repo,\n logger,\n defaultBranch,\n bypassPullRequestAllowances,\n requiredApprovingReviewCount,\n restrictions,\n requireCodeOwnerReviews,\n requiredStatusCheckContexts,\n requireBranchesToBeUpToDate,\n requiredConversationResolution,\n requireLastPushApproval,\n enforceAdmins: protectEnforceAdmins,\n dismissStaleReviews: dismissStaleReviews,\n requiredCommitSigning: requiredCommitSigning,\n requiredLinearHistory: requiredLinearHistory,\n });\n } catch (e) {\n assertError(e);\n logger.warn(\n `Skipping: default branch protection on '${repo}', ${e.message}`,\n );\n }\n }\n\n return { commitHash: commitResult.commitHash };\n}\n\nfunction extractCollaboratorName(\n collaborator: { user: string } | { team: string } | { username: string },\n) {\n if ('username' in collaborator) return collaborator.username;\n if ('user' in collaborator) return collaborator.user;\n return collaborator.team;\n}\n\nasync function validateAccessTeam(client: Octokit, access: string) {\n const [org, team_slug] = access.split('/');\n try {\n // Below rule disabled because of a 'getByName' check for a different library\n // incorrectly triggers here.\n // eslint-disable-next-line testing-library/no-await-sync-queries\n await client.rest.teams.getByName({\n org,\n team_slug,\n });\n } catch (e) {\n if (e.response.data.message === 'Not Found') {\n const message = `Received 'Not Found' from the API; one of org:\n ${org} or team: ${team_slug} was not found within GitHub.`;\n throw new NotFoundError(message);\n }\n }\n}\n\nexport function getGitCommitMessage(\n gitCommitMessage: string | undefined,\n config: Config,\n): string | undefined {\n return gitCommitMessage\n ? gitCommitMessage\n : config.getOptionalString('scaffolder.defaultCommitMessage');\n}\n"],"names":["assertError","entityRefToName","Sodium","initRepoAndPush","getRepoSourceDirectory","enableBranchProtectionOnDefaultRepoBranch","NotFoundError"],"mappings":";;;;;;;;;;;AAgCsB,eAAA,0CAAA,CACpB,MACA,EAAA,IAAA,EACA,KACA,EAAA,cAAA,EACA,WACA,EAAA,QAAA,EACA,mBACA,EAAA,gBAAA,EACA,gBACA,EAAA,sBAAA,EACA,wBACA,EAAA,gBAAA,EACA,gBACA,iBACA,EAAA,MAAA,EACA,aAiBA,EAAA,WAAA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AI,IAAA,MAAA,IAAU,YAAc,EAAA,OAAO,YAAa,CAAA,IAAA;AAChD,EAAA,OAAO,YAAa,CAAA,IAAA;AACtB;AAEA,eAAe,kBAAA,CAAmB,QAAiB,MAAgB,EAAA;AACjE,EAAA,MAAM,CAAC,GAAK,EAAA,SAAS,CAAI,GAAA,MAAA,CAAO,MAAM,GAAG,CAAA;AACzC,EAAI,IAAA;AAIF,IAAM,MAAA,MAAA,CAAO,IAAK,CAAA,KAAA,CAAM,SAAU,CAAA;AAAA,MAChC,GAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,WACM,CAAG,EAAA;AACV,IAAA,IAAI,CAAE,CAAA,QAAA,CAAS,IAAK,CAAA,OAAA,KAAY,WAAa,EAAA;AAC3C,MAAA,MAAM,OAAU,GAAA,CAAA;AAAA,QACZ,EAAA,GAAG,aAAa,SAAS,CAAA,6BAAA,CAAA;AAC7B,MAAM,MAAA,IAAIM,qBAAc,OAAO,CAAA;AAAA;AACjC;AAEJ;AAEgB,SAAA,mBAAA,CACd,kBACA,MACoB,EAAA;AACpB,EAAA,OAAO,gBACH,GAAA,gBAAA,GACA,MAAO,CAAA,iBAAA,CAAkB,iCAAiC,CAAA;AAChE;;;;;;"}
|
|
1
|
+
{"version":3,"file":"helpers.cjs.js","sources":["../../src/actions/helpers.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { assertError, NotFoundError } from '@backstage/errors';\nimport { Octokit } from 'octokit';\n\nimport {\n getRepoSourceDirectory,\n initRepoAndPush,\n} from '@backstage/plugin-scaffolder-node';\n\nimport Sodium from 'libsodium-wrappers';\nimport {\n enableBranchProtectionOnDefaultRepoBranch,\n entityRefToName,\n} from './gitHelpers';\nimport { LoggerService } from '@backstage/backend-plugin-api';\n\nexport async function createGithubRepoWithCollaboratorsAndTopics(\n client: Octokit,\n repo: string,\n owner: string,\n repoVisibility: 'private' | 'internal' | 'public' | undefined,\n description: string | undefined,\n homepage: string | undefined,\n deleteBranchOnMerge: boolean,\n allowMergeCommit: boolean,\n allowSquashMerge: boolean,\n squashMergeCommitTitle: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined,\n squashMergeCommitMessage: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' | undefined,\n allowRebaseMerge: boolean,\n allowAutoMerge: boolean,\n allowUpdateBranch: boolean,\n access: string | undefined,\n collaborators:\n | (\n | {\n user: string;\n access: string;\n }\n | {\n team: string;\n access: string;\n }\n | {\n /** @deprecated This field is deprecated in favor of team */\n username: string;\n access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';\n }\n )[]\n | undefined,\n hasProjects: boolean | undefined,\n hasWiki: boolean | undefined,\n hasIssues: boolean | undefined,\n topics: string[] | undefined,\n repoVariables: { [key: string]: string } | undefined,\n secrets: { [key: string]: string } | undefined,\n oidcCustomization:\n | {\n useDefault: boolean;\n includeClaimKeys?: string[];\n }\n | undefined,\n customProperties: { [key: string]: string | string[] } | undefined,\n subscribe: boolean | undefined,\n logger: LoggerService,\n) {\n // eslint-disable-next-line testing-library/no-await-sync-queries\n const user = await client.rest.users.getByUsername({\n username: owner,\n });\n\n if (access?.startsWith(`${owner}/`)) {\n await validateAccessTeam(client, access);\n }\n\n const repoCreationPromise =\n user.data.type === 'Organization'\n ? client.rest.repos.createInOrg({\n name: repo,\n org: owner,\n private: repoVisibility === 'private',\n // @ts-ignore https://github.com/octokit/types.ts/issues/522\n visibility: repoVisibility,\n description: description,\n delete_branch_on_merge: deleteBranchOnMerge,\n allow_merge_commit: allowMergeCommit,\n allow_squash_merge: allowSquashMerge,\n squash_merge_commit_title: squashMergeCommitTitle,\n squash_merge_commit_message: squashMergeCommitMessage,\n allow_rebase_merge: allowRebaseMerge,\n allow_auto_merge: allowAutoMerge,\n allow_update_branch: allowUpdateBranch,\n homepage: homepage,\n has_projects: hasProjects,\n has_wiki: hasWiki,\n has_issues: hasIssues,\n // Custom properties only available on org repos\n custom_properties: customProperties,\n })\n : client.rest.repos.createForAuthenticatedUser({\n name: repo,\n private: repoVisibility === 'private',\n description: description,\n delete_branch_on_merge: deleteBranchOnMerge,\n allow_merge_commit: allowMergeCommit,\n allow_squash_merge: allowSquashMerge,\n squash_merge_commit_title: squashMergeCommitTitle,\n squash_merge_commit_message: squashMergeCommitMessage,\n allow_rebase_merge: allowRebaseMerge,\n allow_auto_merge: allowAutoMerge,\n allow_update_branch: allowUpdateBranch,\n homepage: homepage,\n has_projects: hasProjects,\n has_wiki: hasWiki,\n has_issues: hasIssues,\n });\n\n let newRepo;\n\n try {\n newRepo = (await repoCreationPromise).data;\n } catch (e) {\n assertError(e);\n if (e.message === 'Resource not accessible by integration') {\n logger.warn(\n `The GitHub app or token provided may not have the required permissions to create the ${user.data.type} repository ${owner}/${repo}.`,\n );\n }\n throw new Error(\n `Failed to create the ${user.data.type} repository ${owner}/${repo}, ${e.message}`,\n );\n }\n\n if (access?.startsWith(`${owner}/`)) {\n const [, team] = access.split('/');\n await client.rest.teams.addOrUpdateRepoPermissionsInOrg({\n org: owner,\n team_slug: team,\n owner,\n repo,\n permission: 'admin',\n });\n // No need to add access if it's the person who owns the personal account\n } else if (access && access !== owner) {\n await client.rest.repos.addCollaborator({\n owner,\n repo,\n username: access,\n permission: 'admin',\n });\n }\n\n if (collaborators) {\n for (const collaborator of collaborators) {\n try {\n if ('user' in collaborator) {\n await client.rest.repos.addCollaborator({\n owner,\n repo,\n username: entityRefToName(collaborator.user),\n permission: collaborator.access,\n });\n } else if ('team' in collaborator) {\n await client.rest.teams.addOrUpdateRepoPermissionsInOrg({\n org: owner,\n team_slug: entityRefToName(collaborator.team),\n owner,\n repo,\n permission: collaborator.access,\n });\n }\n } catch (e) {\n assertError(e);\n const name = extractCollaboratorName(collaborator);\n logger.warn(\n `Skipping ${collaborator.access} access for ${name}, ${e.message}`,\n );\n }\n }\n }\n\n if (topics) {\n try {\n await client.rest.repos.replaceAllTopics({\n owner,\n repo,\n names: topics.map(t => t.toLowerCase()),\n });\n } catch (e) {\n assertError(e);\n logger.warn(`Skipping topics ${topics.join(' ')}, ${e.message}`);\n }\n }\n\n for (const [key, value] of Object.entries(repoVariables ?? {})) {\n await client.rest.actions.createRepoVariable({\n owner,\n repo,\n name: key,\n value: value,\n });\n }\n\n if (secrets) {\n const publicKeyResponse = await client.rest.actions.getRepoPublicKey({\n owner,\n repo,\n });\n\n await Sodium.ready;\n const binaryKey = Sodium.from_base64(\n publicKeyResponse.data.key,\n Sodium.base64_variants.ORIGINAL,\n );\n for (const [key, value] of Object.entries(secrets)) {\n const binarySecret = Sodium.from_string(value);\n const encryptedBinarySecret = Sodium.crypto_box_seal(\n binarySecret,\n binaryKey,\n );\n const encryptedBase64Secret = Sodium.to_base64(\n encryptedBinarySecret,\n Sodium.base64_variants.ORIGINAL,\n );\n\n await client.rest.actions.createOrUpdateRepoSecret({\n owner,\n repo,\n secret_name: key,\n encrypted_value: encryptedBase64Secret,\n key_id: publicKeyResponse.data.key_id,\n });\n }\n }\n\n if (oidcCustomization) {\n await client.request(\n 'PUT /repos/{owner}/{repo}/actions/oidc/customization/sub',\n {\n owner,\n repo,\n use_default: oidcCustomization.useDefault,\n include_claim_keys: oidcCustomization.includeClaimKeys,\n },\n );\n }\n\n if (subscribe) {\n await client.rest.activity.setRepoSubscription({\n subscribed: true,\n ignored: false,\n owner,\n repo,\n });\n }\n\n return newRepo;\n}\n\nexport async function initRepoPushAndProtect(\n remoteUrl: string,\n password: string,\n workspacePath: string,\n sourcePath: string | undefined,\n defaultBranch: string,\n protectDefaultBranch: boolean,\n protectEnforceAdmins: boolean,\n owner: string,\n client: Octokit,\n repo: string,\n requireCodeOwnerReviews: boolean,\n bypassPullRequestAllowances:\n | {\n users?: string[];\n teams?: string[];\n apps?: string[];\n }\n | undefined,\n requiredApprovingReviewCount: number,\n restrictions:\n | {\n users: string[];\n teams: string[];\n apps?: string[];\n }\n | undefined,\n requiredStatusCheckContexts: string[],\n requireBranchesToBeUpToDate: boolean,\n requiredConversationResolution: boolean,\n requireLastPushApproval: boolean,\n config: Config,\n logger: any,\n gitCommitMessage?: string,\n gitAuthorName?: string,\n gitAuthorEmail?: string,\n dismissStaleReviews?: boolean,\n requiredCommitSigning?: boolean,\n requiredLinearHistory?: boolean,\n): Promise<{ commitHash: string }> {\n const gitAuthorInfo = {\n name: gitAuthorName\n ? gitAuthorName\n : config.getOptionalString('scaffolder.defaultAuthor.name'),\n email: gitAuthorEmail\n ? gitAuthorEmail\n : config.getOptionalString('scaffolder.defaultAuthor.email'),\n };\n\n const commitMessage =\n getGitCommitMessage(gitCommitMessage, config) || 'initial commit';\n\n const commitResult = await initRepoAndPush({\n dir: getRepoSourceDirectory(workspacePath, sourcePath),\n remoteUrl,\n defaultBranch,\n auth: {\n username: 'x-access-token',\n password,\n },\n logger,\n commitMessage,\n gitAuthorInfo,\n });\n\n if (protectDefaultBranch) {\n try {\n await enableBranchProtectionOnDefaultRepoBranch({\n owner,\n client,\n repoName: repo,\n logger,\n defaultBranch,\n bypassPullRequestAllowances,\n requiredApprovingReviewCount,\n restrictions,\n requireCodeOwnerReviews,\n requiredStatusCheckContexts,\n requireBranchesToBeUpToDate,\n requiredConversationResolution,\n requireLastPushApproval,\n enforceAdmins: protectEnforceAdmins,\n dismissStaleReviews: dismissStaleReviews,\n requiredCommitSigning: requiredCommitSigning,\n requiredLinearHistory: requiredLinearHistory,\n });\n } catch (e) {\n assertError(e);\n logger.warn(\n `Skipping: default branch protection on '${repo}', ${e.message}`,\n );\n }\n }\n\n return { commitHash: commitResult.commitHash };\n}\n\nfunction extractCollaboratorName(\n collaborator: { user: string } | { team: string } | { username: string },\n) {\n if ('username' in collaborator) return collaborator.username;\n if ('user' in collaborator) return collaborator.user;\n return collaborator.team;\n}\n\nasync function validateAccessTeam(client: Octokit, access: string) {\n const [org, team_slug] = access.split('/');\n try {\n // Below rule disabled because of a 'getByName' check for a different library\n // incorrectly triggers here.\n // eslint-disable-next-line testing-library/no-await-sync-queries\n await client.rest.teams.getByName({\n org,\n team_slug,\n });\n } catch (e) {\n if (e.response.data.message === 'Not Found') {\n const message = `Received 'Not Found' from the API; one of org:\n ${org} or team: ${team_slug} was not found within GitHub.`;\n throw new NotFoundError(message);\n }\n }\n}\n\nexport function getGitCommitMessage(\n gitCommitMessage: string | undefined,\n config: Config,\n): string | undefined {\n return gitCommitMessage\n ? gitCommitMessage\n : config.getOptionalString('scaffolder.defaultCommitMessage');\n}\n"],"names":["assertError","entityRefToName","Sodium","initRepoAndPush","getRepoSourceDirectory","enableBranchProtectionOnDefaultRepoBranch","NotFoundError"],"mappings":";;;;;;;;;;;AAgCA,eAAsB,0CAAA,CACpB,MAAA,EACA,IAAA,EACA,KAAA,EACA,cAAA,EACA,WAAA,EACA,QAAA,EACA,mBAAA,EACA,gBAAA,EACA,gBAAA,EACA,sBAAA,EACA,wBAAA,EACA,gBAAA,EACA,gBACA,iBAAA,EACA,MAAA,EACA,aAAA,EAiBA,WAAA,EACA,OAAA,EACA,SAAA,EACA,MAAA,EACA,aAAA,EACA,OAAA,EACA,iBAAA,EAMA,gBAAA,EACA,SAAA,EACA,MAAA,EACA;AAEA,EAAA,MAAM,IAAA,GAAO,MAAM,MAAA,CAAO,IAAA,CAAK,MAAM,aAAA,CAAc;AAAA,IACjD,QAAA,EAAU;AAAA,GACX,CAAA;AAED,EAAA,IAAI,MAAA,EAAQ,UAAA,CAAW,CAAA,EAAG,KAAK,GAAG,CAAA,EAAG;AACnC,IAAA,MAAM,kBAAA,CAAmB,QAAQ,MAAM,CAAA;AAAA,EACzC;AAEA,EAA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IAAA,MAAM,MAAA,CAAO,IAAA,CAAK,KAAA,CAAM,SAAA,CAAU;AAAA,MAChC,GAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,EACH,SAAS,CAAA,EAAG;AACV,IAAA,IAAI,CAAA,CAAE,QAAA,CAAS,IAAA,CAAK,OAAA,KAAY,WAAA,EAAa;AAC3C,MAAA,MAAM,OAAA,GAAU,CAAA;AAAA,QAAA,EACZ,GAAG,aAAa,SAAS,CAAA,6BAAA,CAAA;AAC7B,MAAA,MAAM,IAAIM,qBAAc,OAAO,CAAA;AAAA,IACjC;AAAA,EACF;AACF;AAEO,SAAS,mBAAA,CACd,kBACA,MAAA,EACoB;AACpB,EAAA,OAAO,gBAAA,GACH,gBAAA,GACA,MAAA,CAAO,iBAAA,CAAkB,iCAAiC,CAAA;AAChE;;;;;;"}
|
|
@@ -164,8 +164,8 @@ const oidcCustomization = (z) => z.object(
|
|
|
164
164
|
description: `OIDC customization template attached to the repository.`
|
|
165
165
|
}
|
|
166
166
|
).optional();
|
|
167
|
-
const customProperties = (z) => z.record(z.string(), {
|
|
168
|
-
description: "Custom properties to be added to the repository (note, this only works for organization repositories)"
|
|
167
|
+
const customProperties = (z) => z.record(z.union([z.string(), z.array(z.string())]), {
|
|
168
|
+
description: "Custom properties to be added to the repository (note, this only works for organization repositories). All values must be strings"
|
|
169
169
|
}).optional();
|
|
170
170
|
const subscribe = (z) => z.boolean({
|
|
171
171
|
description: `Subscribe to the repository. The default value is 'false'`
|