syncTeams
syncTeams(
client,repo,teams):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/teams.ts:21
Grants each team access to the repo and reports the outcome; throws when every team fails.
Parameters
Section titled “Parameters”client
Section titled “client”branches
Section titled “branches”{ listBranches: (repo) => Promise<GitHubBranch[]>; protectBranch: (repo, branch, payload) => Promise<void>; removeBranch: (repo, branch) => Promise<void>; }
branches.listBranches
Section titled “branches.listBranches”(repo) => Promise<GitHubBranch[]>
branches.protectBranch
Section titled “branches.protectBranch”(repo, branch, payload) => Promise<void>
branches.removeBranch
Section titled “branches.removeBranch”(repo, branch) => Promise<void>
checks
Section titled “checks”{ createCheckRun: (repo, input) => Promise<GitHubCheckRun>; listCheckRunsForRef: (repo, ref) => Promise<GitHubCheckRun[]>; updateCheckRun: (repo, checkRunId, input) => Promise<GitHubCheckRun>; }
checks.createCheckRun
Section titled “checks.createCheckRun”(repo, input) => Promise<GitHubCheckRun>
checks.listCheckRunsForRef
Section titled “checks.listCheckRunsForRef”(repo, ref) => Promise<GitHubCheckRun[]>
checks.updateCheckRun
Section titled “checks.updateCheckRun”(repo, checkRunId, input) => Promise<GitHubCheckRun>
environments
Section titled “environments”{ deleteEnvironment: (repo, name) => Promise<void>; listEnvironments: (repo) => Promise<GitHubEnvironment[]>; upsertEnvironment: (repo, name, body) => Promise<void>; }
environments.deleteEnvironment
Section titled “environments.deleteEnvironment”(repo, name) => Promise<void>
environments.listEnvironments
Section titled “environments.listEnvironments”(repo) => Promise<GitHubEnvironment[]>
environments.upsertEnvironment
Section titled “environments.upsertEnvironment”(repo, name, body) => Promise<void>
{ createBlob: (repo, content, encoding?) => Promise<GitBlob>; createCommit: (repo, message, tree, parents) => Promise<GitCommit>; createPull: (repo, input) => Promise<GitPull>; createRef: (repo, ref, sha) => Promise<GitRef>; createTree: (repo, tree, baseTree?) => Promise<GitTree>; getCommit: (repo, sha) => Promise<GitCommit>; getContents: (repo, path, ref?) => Promise<GitContents>; getRef: (repo, branch) => Promise<GitRef>; getTree: (repo, sha, recursive?) => Promise<GitTree>; listDirectory: (repo, path, options?) => Promise<GitDirectoryEntry[]>; listTree: (repo, path, options?) => Promise<GitDirectoryEntry[] | undefined>; putContents: (repo, path, input) => Promise<PutContentsResult>; updateRef: (repo, ref, sha, force?) => Promise<GitRef>; }
git.createBlob
Section titled “git.createBlob”(repo, content, encoding?) => Promise<GitBlob>
git.createCommit
Section titled “git.createCommit”(repo, message, tree, parents) => Promise<GitCommit>
git.createPull
Section titled “git.createPull”(repo, input) => Promise<GitPull>
git.createRef
Section titled “git.createRef”(repo, ref, sha) => Promise<GitRef>
git.createTree
Section titled “git.createTree”(repo, tree, baseTree?) => Promise<GitTree>
git.getCommit
Section titled “git.getCommit”(repo, sha) => Promise<GitCommit>
git.getContents
Section titled “git.getContents”(repo, path, ref?) => Promise<GitContents>
git.getRef
Section titled “git.getRef”(repo, branch) => Promise<GitRef>
git.getTree
Section titled “git.getTree”(repo, sha, recursive?) => Promise<GitTree>
git.listDirectory
Section titled “git.listDirectory”(repo, path, options?) => Promise<GitDirectoryEntry[]>
git.listTree
Section titled “git.listTree”(repo, path, options?) => Promise<GitDirectoryEntry[] | undefined>
git.putContents
Section titled “git.putContents”(repo, path, input) => Promise<PutContentsResult>
git.updateRef
Section titled “git.updateRef”(repo, ref, sha, force?) => Promise<GitRef>
graphql
Section titled “graphql”GraphQLClient
The GraphQL client, for the callers whose API (Projects v2) has no REST form.
{ createHook: (scope, input) => Promise<GitHubHook>; listHooks: (scope) => Promise<GitHubHook[]>; updateHook: (scope, id, input) => Promise<GitHubHook>; }
hooks.createHook
Section titled “hooks.createHook”(scope, input) => Promise<GitHubHook>
hooks.listHooks
Section titled “hooks.listHooks”(scope) => Promise<GitHubHook[]>
hooks.updateHook
Section titled “hooks.updateHook”(scope, id, input) => Promise<GitHubHook>
issueFields
Section titled “issueFields”{ addValues: (repo, number, values) => Promise<GitHubIssueFieldValue[]>; deleteValue: (repo, number, fieldId) => Promise<void>; list: (org) => Promise<GitHubIssueField[]>; values: (repo, number) => Promise<GitHubIssueFieldValue[]>; }
issueFields.addValues
Section titled “issueFields.addValues”(repo, number, values) => Promise<GitHubIssueFieldValue[]>
issueFields.deleteValue
Section titled “issueFields.deleteValue”(repo, number, fieldId) => Promise<void>
issueFields.list
Section titled “issueFields.list”(org) => Promise<GitHubIssueField[]>
issueFields.values
Section titled “issueFields.values”(repo, number) => Promise<GitHubIssueFieldValue[]>
issues
Section titled “issues”{ addBlockedBy: (repo, number, blockerId) => Promise<GitHubIssue>; addLabels: (repo, number, labels) => Promise<void>; addSubIssue: (repo, number, subIssueId, replaceParent?) => Promise<GitHubIssue>; countSearch: (repo, query) => Promise<number>; createComment: (repo, number, body) => Promise<void>; createIssue: (repo, body) => Promise<GitHubIssue>; createMilestone: (repo, title) => Promise<GitHubMilestone>; getIssue: (repo, number) => Promise<GitHubIssue>; getParent: (repo, number) => Promise<GitHubIssue | null>; listBlockedBy: (repo, number) => Promise<GitHubIssue[]>; listComments: (repo, number) => Promise<GitHubIssueComment[]>; listIssues: (repo, params?) => Promise<GitHubIssue[]>; listMilestones: (repo, params?) => Promise<GitHubMilestone[]>; removeBlockedBy: (repo, number, blockerId) => Promise<GitHubIssue>; removeLabel: (repo, number, label) => Promise<void>; removeSubIssue: (repo, number, subIssueId) => Promise<GitHubIssue>; updateIssue: (repo, number, body) => Promise<GitHubIssue>; }
issues.addBlockedBy
Section titled “issues.addBlockedBy”(repo, number, blockerId) => Promise<GitHubIssue>
issues.addLabels
Section titled “issues.addLabels”(repo, number, labels) => Promise<void>
issues.addSubIssue
Section titled “issues.addSubIssue”(repo, number, subIssueId, replaceParent?) => Promise<GitHubIssue>
issues.countSearch
Section titled “issues.countSearch”(repo, query) => Promise<number>
issues.createComment
Section titled “issues.createComment”(repo, number, body) => Promise<void>
issues.createIssue
Section titled “issues.createIssue”(repo, body) => Promise<GitHubIssue>
issues.createMilestone
Section titled “issues.createMilestone”(repo, title) => Promise<GitHubMilestone>
issues.getIssue
Section titled “issues.getIssue”(repo, number) => Promise<GitHubIssue>
issues.getParent
Section titled “issues.getParent”(repo, number) => Promise<GitHubIssue | null>
issues.listBlockedBy
Section titled “issues.listBlockedBy”(repo, number) => Promise<GitHubIssue[]>
issues.listComments
Section titled “issues.listComments”(repo, number) => Promise<GitHubIssueComment[]>
issues.listIssues
Section titled “issues.listIssues”(repo, params?) => Promise<GitHubIssue[]>
issues.listMilestones
Section titled “issues.listMilestones”(repo, params?) => Promise<GitHubMilestone[]>
issues.removeBlockedBy
Section titled “issues.removeBlockedBy”(repo, number, blockerId) => Promise<GitHubIssue>
issues.removeLabel
Section titled “issues.removeLabel”(repo, number, label) => Promise<void>
issues.removeSubIssue
Section titled “issues.removeSubIssue”(repo, number, subIssueId) => Promise<GitHubIssue>
issues.updateIssue
Section titled “issues.updateIssue”(repo, number, body) => Promise<GitHubIssue>
issueTypes
Section titled “issueTypes”{ create: (org, input) => Promise<OrgIssueTypeInfo>; list: (org) => Promise<OrgIssueTypeInfo[]>; update: (org, id, input) => Promise<OrgIssueTypeInfo>; }
issueTypes.create
Section titled “issueTypes.create”(org, input) => Promise<OrgIssueTypeInfo>
issueTypes.list
Section titled “issueTypes.list”(org) => Promise<OrgIssueTypeInfo[]>
issueTypes.update
Section titled “issueTypes.update”(org, id, input) => Promise<OrgIssueTypeInfo>
labels
Section titled “labels”{ createLabel: (repo, body) => Promise<GitHubLabel>; deleteLabel: (repo, name) => Promise<void>; listLabels: (repo) => Promise<GitHubLabel[]>; updateLabel: (repo, name, body) => Promise<GitHubLabel>; }
labels.createLabel
Section titled “labels.createLabel”(repo, body) => Promise<GitHubLabel>
labels.deleteLabel
Section titled “labels.deleteLabel”(repo, name) => Promise<void>
labels.listLabels
Section titled “labels.listLabels”(repo) => Promise<GitHubLabel[]>
labels.updateLabel
Section titled “labels.updateLabel”(repo, name, body) => Promise<GitHubLabel>
{ createPages: (repo, payload) => Promise<GitHubPages>; getPages: (repo) => Promise<GitHubPages | null>; updatePages: (repo, payload) => Promise<void>; }
pages.createPages
Section titled “pages.createPages”(repo, payload) => Promise<GitHubPages>
pages.getPages
Section titled “pages.getPages”(repo) => Promise<GitHubPages | null>
pages.updatePages
Section titled “pages.updatePages”(repo, payload) => Promise<void>
properties
Section titled “properties”{ getValues: (repo) => Promise<RepoPropertyValue[]>; orgSchema: (org) => Promise<OrgProperty[]>; setOrgProperty: (org, property) => Promise<OrgProperty>; setProperties: (repo, values) => Promise<void>; }
properties.getValues
Section titled “properties.getValues”(repo) => Promise<RepoPropertyValue[]>
properties.orgSchema
Section titled “properties.orgSchema”(org) => Promise<OrgProperty[]>
properties.setOrgProperty
Section titled “properties.setOrgProperty”(org, property) => Promise<OrgProperty>
properties.setProperties
Section titled “properties.setProperties”(repo, values) => Promise<void>
{ createPullRequest: (repo, input) => Promise<GitHubPullRequest>; createReview: (repo, number, input) => Promise<GitHubPullRequestReview>; getPullRequest: (repo, number) => Promise<GitHubPullRequest>; listCommits: (repo, number) => Promise<GitHubPullRequestCommit[]>; listFiles: (repo, number) => Promise<GitHubPullRequestFile[]>; listOpenByHead: (repo, branch) => Promise<GitHubPullRequest[]>; listPullRequests: (repo, state) => Promise<GitHubPullRequest[]>; listReviews: (repo, number) => Promise<GitHubPullRequestReview[]>; listReviewThreads: (repo, number) => Promise<ReviewThread[]>; markReadyForReview: (nodeId) => Promise<void>; resolveReviewThread: (threadId) => Promise<void>; updatePullRequest: (repo, number, input) => Promise<GitHubPullRequest>; }
pulls.createPullRequest
Section titled “pulls.createPullRequest”(repo, input) => Promise<GitHubPullRequest>
pulls.createReview
Section titled “pulls.createReview”(repo, number, input) => Promise<GitHubPullRequestReview>
pulls.getPullRequest
Section titled “pulls.getPullRequest”(repo, number) => Promise<GitHubPullRequest>
pulls.listCommits
Section titled “pulls.listCommits”(repo, number) => Promise<GitHubPullRequestCommit[]>
pulls.listFiles
Section titled “pulls.listFiles”(repo, number) => Promise<GitHubPullRequestFile[]>
pulls.listOpenByHead
Section titled “pulls.listOpenByHead”(repo, branch) => Promise<GitHubPullRequest[]>
pulls.listPullRequests
Section titled “pulls.listPullRequests”(repo, state) => Promise<GitHubPullRequest[]>
pulls.listReviews
Section titled “pulls.listReviews”(repo, number) => Promise<GitHubPullRequestReview[]>
pulls.listReviewThreads
Section titled “pulls.listReviewThreads”(repo, number) => Promise<ReviewThread[]>
pulls.markReadyForReview
Section titled “pulls.markReadyForReview”(nodeId) => Promise<void>
pulls.resolveReviewThread
Section titled “pulls.resolveReviewThread”(threadId) => Promise<void>
pulls.updatePullRequest
Section titled “pulls.updatePullRequest”(repo, number, input) => Promise<GitHubPullRequest>
{ getContents: (repo, path) => Promise<GitHubContents>; getRepo: (repo) => Promise<GitHubRepo>; updateRepo: (repo, settings) => Promise<void>; }
repos.getContents
Section titled “repos.getContents”(repo, path) => Promise<GitHubContents>
repos.getRepo
Section titled “repos.getRepo”(repo) => Promise<GitHubRepo>
repos.updateRepo
Section titled “repos.updateRepo”(repo, settings) => Promise<void>
rulesets
Section titled “rulesets”{ createRuleset: (repo, payload) => Promise<GitHubRuleset>; getRuleset: (repo, id) => Promise<GitHubRulesetDetail>; listRulesets: (repo) => Promise<GitHubRuleset[]>; updateRuleset: (repo, id, payload) => Promise<GitHubRuleset>; }
rulesets.createRuleset
Section titled “rulesets.createRuleset”(repo, payload) => Promise<GitHubRuleset>
rulesets.getRuleset
Section titled “rulesets.getRuleset”(repo, id) => Promise<GitHubRulesetDetail>
rulesets.listRulesets
Section titled “rulesets.listRulesets”(repo) => Promise<GitHubRuleset[]>
rulesets.updateRuleset
Section titled “rulesets.updateRuleset”(repo, id, payload) => Promise<GitHubRuleset>
secrets
Section titled “secrets”{ deleteSecret: (repo, scope, name) => Promise<void>; getPublicKey: (repo, scope) => Promise<GitHubPublicKey>; listOrgSecretInfo: (org) => Promise<OrgSecretInfo[]>; listSecrets: (repo, scope) => Promise<string[]>; listSelectedRepositories: (org, name) => Promise<string[]>; putSecret: (repo, scope, name, body) => Promise<void>; }
secrets.deleteSecret
Section titled “secrets.deleteSecret”(repo, scope, name) => Promise<void>
secrets.getPublicKey
Section titled “secrets.getPublicKey”(repo, scope) => Promise<GitHubPublicKey>
secrets.listOrgSecretInfo
Section titled “secrets.listOrgSecretInfo”(org) => Promise<OrgSecretInfo[]>
secrets.listSecrets
Section titled “secrets.listSecrets”(repo, scope) => Promise<string[]>
secrets.listSelectedRepositories
Section titled “secrets.listSelectedRepositories”(org, name) => Promise<string[]>
secrets.putSecret
Section titled “secrets.putSecret”(repo, scope, name, body) => Promise<void>
security
Section titled “security”{ automatedSecurityFixesEnabled: (repo) => Promise<boolean>; codeScanningDefaultSetupState: (repo) => Promise<string>; disableDefaultCodeScanning: (repo) => Promise<void>; enableAutomatedSecurityFixes: (repo) => Promise<void>; enableCodeScanning: (repo) => Promise<CodeScanningSetupResult>; enableDependencyGraph: (repo) => Promise<void>; enablePrivateVulnerabilityReporting: (repo) => Promise<void>; enableSecretScanning: (repo) => Promise<void>; enableVulnerabilityAlerts: (repo) => Promise<void>; privateVulnerabilityReportingEnabled: (repo) => Promise<boolean>; vulnerabilityAlertsEnabled: (repo) => Promise<boolean>; }
security.automatedSecurityFixesEnabled
Section titled “security.automatedSecurityFixesEnabled”(repo) => Promise<boolean>
security.codeScanningDefaultSetupState
Section titled “security.codeScanningDefaultSetupState”(repo) => Promise<string>
security.disableDefaultCodeScanning
Section titled “security.disableDefaultCodeScanning”(repo) => Promise<void>
security.enableAutomatedSecurityFixes
Section titled “security.enableAutomatedSecurityFixes”(repo) => Promise<void>
security.enableCodeScanning
Section titled “security.enableCodeScanning”(repo) => Promise<CodeScanningSetupResult>
security.enableDependencyGraph
Section titled “security.enableDependencyGraph”(repo) => Promise<void>
security.enablePrivateVulnerabilityReporting
Section titled “security.enablePrivateVulnerabilityReporting”(repo) => Promise<void>
security.enableSecretScanning
Section titled “security.enableSecretScanning”(repo) => Promise<void>
security.enableVulnerabilityAlerts
Section titled “security.enableVulnerabilityAlerts”(repo) => Promise<void>
security.privateVulnerabilityReportingEnabled
Section titled “security.privateVulnerabilityReportingEnabled”(repo) => Promise<boolean>
security.vulnerabilityAlertsEnabled
Section titled “security.vulnerabilityAlertsEnabled”(repo) => Promise<boolean>
statuses
Section titled “statuses”{ listCommitStatuses: (repo, ref) => Promise<GitHubCommitStatus[]>; }
statuses.listCommitStatuses
Section titled “statuses.listCommitStatuses”(repo, ref) => Promise<GitHubCommitStatus[]>
{ addRepo: (org, teamSlug, owner, repo, permission) => Promise<void>; listForRepo: (repo) => Promise<RepoTeam[]>; members: (org, teamSlug) => Promise<TeamMember[]>; }
teams.addRepo
Section titled “teams.addRepo”(org, teamSlug, owner, repo, permission) => Promise<void>
teams.listForRepo
Section titled “teams.listForRepo”(repo) => Promise<RepoTeam[]>
teams.members
Section titled “teams.members”(org, teamSlug) => Promise<TeamMember[]>
topics
Section titled “topics”{ setTopics: (repo, names) => Promise<void>; }
topics.setTopics
Section titled “topics.setTopics”(repo, names) => Promise<void>
{ getCurrentUser: () => Promise<GitHubUser>; getCurrentUserWithExpiry(): Promise<GitHubUserWithExpiry>; }
user.getCurrentUser
Section titled “user.getCurrentUser”() => Promise<GitHubUser>
user.getCurrentUserWithExpiry
Section titled “user.getCurrentUserWithExpiry”() => Promise<GitHubUserWithExpiry>
variables
Section titled “variables”{ createVariable: (repo, scope, body) => Promise<void>; deleteVariable: (repo, scope, name) => Promise<void>; getVariable: (repo, scope, name) => Promise<GitHubVariable | null>; listVariables: (repo, scope) => Promise<GitHubVariable[]>; updateVariable: (repo, scope, name, body) => Promise<void>; }
variables.createVariable
Section titled “variables.createVariable”(repo, scope, body) => Promise<void>
variables.deleteVariable
Section titled “variables.deleteVariable”(repo, scope, name) => Promise<void>
variables.getVariable
Section titled “variables.getVariable”(repo, scope, name) => Promise<GitHubVariable | null>
variables.listVariables
Section titled “variables.listVariables”(repo, scope) => Promise<GitHubVariable[]>
variables.updateVariable
Section titled “variables.updateVariable”(repo, scope, name, body) => Promise<void>
workflows
Section titled “workflows”{ createWorkflowDispatch: (repo, workflowFile, ref, inputs?) => Promise<void>; getRun: (repo, id) => Promise<GitHubWorkflowRun>; listJobs: (repo, runId) => Promise<GitHubWorkflowJob[]>; listRuns: (repo, filter?) => Promise<GitHubWorkflowRun[]>; }
workflows.createWorkflowDispatch
Section titled “workflows.createWorkflowDispatch”(repo, workflowFile, ref, inputs?) => Promise<void>
workflows.getRun
Section titled “workflows.getRun”(repo, id) => Promise<GitHubWorkflowRun>
workflows.listJobs
Section titled “workflows.listJobs”(repo, runId) => Promise<GitHubWorkflowJob[]>
workflows.listRuns
Section titled “workflows.listRuns”(repo, filter?) => Promise<GitHubWorkflowRun[]>
string
Returns
Section titled “Returns”Promise<string>