GitHubSource
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:78
The GitHub implementation of the source capability: repo settings, rulesets, branch protection, security
features and local workflow files.
Implements
Section titled “Implements”Source
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GitHubSource(
client,opts):GitHubSource
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:95
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[]>
SourceOptions
Returns
Section titled “Returns”GitHubSource
Properties
Section titled “Properties”
readonlykey:"source"
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:80
Capability key, always "source".
Implementation of
Section titled “Implementation of”Source.key
providerName
Section titled “providerName”
readonlyproviderName:"github"="github"
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:82
Provider name, always "github".
Implementation of
Section titled “Implementation of”Source.providerName
Methods
Section titled “Methods”addOrgPropertyValues()
Section titled “addOrgPropertyValues()”addOrgPropertyValues(
name,values):Promise<string[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:270
Adds the values the organization’s custom property name does not allow yet and returns the ones it added. Never
removes or reorders a value, and keeps the rest of the definition as it is. Rejects when the property does not
exist or the token cannot write it (the organization’s Custom properties: admin). Optional.
Parameters
Section titled “Parameters”string
values
Section titled “values”string[]
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”Source.addOrgPropertyValues
checkPropertyValues()
Section titled “checkPropertyValues()”checkPropertyValues(
values):Promise<string[] |undefined>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:280
What is wrong with values when compared with the organization’s custom property definitions: one sentence per
value a single_select or multi_select property does not allow, per property the organization does not
define, or per true_false property that is not true or false. Empty when every value is allowed, and
undefined when the definitions cannot be read (the token lacks the organization’s custom properties
permission). Read-only. Optional — providers without custom properties omit this.
Parameters
Section titled “Parameters”values
Section titled “values”Record<string, string | string[]>
Returns
Section titled “Returns”Promise<string[] | undefined>
Implementation of
Section titled “Implementation of”Source.checkPropertyValues
configurePages()
Section titled “configurePages()”configurePages(
config,token):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:481
Enable or update GitHub Pages for the repository. Idempotent: POST to create, PUT to update existing settings. Requires HOLOCRON_DEPLOY_TOKEN (pages:write + repo scope) — passed explicitly because it is a different PAT from the main admin token. Optional — providers without a Pages concept omit this.
Parameters
Section titled “Parameters”config
Section titled “config”PagesConfig
string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.configurePages
countIssues()
Section titled “countIssues()”countIssues(
query,repo?):Promise<number>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:367
How many issues a search matches in this repository (or in repo, as owner/name): the text is the filter of a
saved view (is:issue state:open is:blocked), and the provider scopes it to the repository. Reads only the count.
Rejects with a ProviderApiError of status 422 when the search refuses the text. Used by doctor repo for
repo.views. Optional.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”Source.countIssues
createCheckRun()
Section titled “createCheckRun()”createCheckRun(
sha,name,write,repo?):Promise<number>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:473
Posts a check run on a commit and returns its id: in progress while the verdict can still change, completed once it is final. Optional — providers that cannot post checks omit this.
Parameters
Section titled “Parameters”string
string
SourceCheckRunWrite
string
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”Source.createCheckRun
createPullRequest()
Section titled “createPullRequest()”createPullRequest(
input,repo?):Promise<PullRequestResult>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:444
Opens a pull request, a draft by default, and links it to an issue with a Closes or Refs line in the body.
Idempotent: an open pull request for the same head is returned (created: false), never a second one. Labels,
assignees, milestone and projects are applied after it is made, and what the provider cannot apply comes back in
dropped. Optional — providers without pull requests omit this.
Parameters
Section titled “Parameters”PullRequestInput
string
Returns
Section titled “Returns”Promise<PullRequestResult>
Implementation of
Section titled “Implementation of”Source.createPullRequest
createRuleset()
Section titled “createRuleset()”createRuleset(
payload):Promise<Ruleset>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:158
Creates a ruleset from the given payload.
Parameters
Section titled “Parameters”payload
Section titled “payload”Record<string, unknown>
Returns
Section titled “Returns”Promise<Ruleset>
Implementation of
Section titled “Implementation of”Source.createRuleset
deleteBranch()
Section titled “deleteBranch()”deleteBranch(
name,repo?):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:422
Delete one branch on the remote. Idempotent: a branch that is already gone is success, not an error. Optional — providers that cannot delete a branch omit this.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.deleteBranch
disableDefaultCodeScanning()
Section titled “disableDefaultCodeScanning()”disableDefaultCodeScanning():
Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:196
Disables CodeQL default setup. Required when the repo uses an advanced CodeQL workflow instead — GitHub rejects SARIF from advanced workflows while default setup is active.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.disableDefaultCodeScanning
enableAutomatedSecurityFixes()
Section titled “enableAutomatedSecurityFixes()”enableAutomatedSecurityFixes():
Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:182
Enables Dependabot automated security fixes.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.enableAutomatedSecurityFixes
enableCodeScanning()
Section titled “enableCodeScanning()”enableCodeScanning():
Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:191
Enables CodeQL default setup with the extended query suite and
threat_model: all (scans both remote and local exploit paths).
Triggers a new analysis run; returns the run id.
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.enableCodeScanning
enableDependencyGraph()
Section titled “enableDependencyGraph()”enableDependencyGraph():
Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:200
Enables the dependency graph and automatic dependency snapshot submission. Also enables secret-scanning validity checks and non-provider pattern detection — these require GitHub Advanced Security at the org level; the call is accepted but may be a no-op until that is configured.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.enableDependencyGraph
enablePrivateVulnerabilityReporting()
Section titled “enablePrivateVulnerabilityReporting()”enablePrivateVulnerabilityReporting():
Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:205
Enables private vulnerability reporting.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.enablePrivateVulnerabilityReporting
enableSecretScanning()
Section titled “enableSecretScanning()”enableSecretScanning():
Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:187
Enables secret scanning.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.enableSecretScanning
enableVulnerabilityAlerts()
Section titled “enableVulnerabilityAlerts()”enableVulnerabilityAlerts():
Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:177
Enables Dependabot vulnerability alerts.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.enableVulnerabilityAlerts
ensureLabels()
Section titled “ensureLabels()”ensureLabels(
labels):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:258
Make the labels that are missing and leave every existing one exactly as it is (name case aside): no colour or
description is patched and nothing is deleted. For per-repo label families such as area:<name>, which are not
in the canonical set syncLabels owns.
Optional — providers that have no label concept omit this.
Parameters
Section titled “Parameters”labels
Section titled “labels”readonly LabelDef[]
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.ensureLabels
ensureRelaySource()
Section titled “ensureRelaySource()”ensureRelaySource(
input):Promise<EnsureRelaySourceResult>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:125
Makes the GitHub webhook for a relay source: on one repository with the admin token, or on the organization
(options.org) with the organization token. Found by URL, events and active brought in line, nothing deleted.
Parameters
Section titled “Parameters”EnsureRelaySourceInput
Returns
Section titled “Returns”Promise<EnsureRelaySourceResult>
Implementation of
Section titled “Implementation of”Source.ensureRelaySource
getOrgPropertyValues()
Section titled “getOrgPropertyValues()”getOrgPropertyValues(
name):Promise<string[] |undefined>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:266
The values the organization’s single_select or multi_select custom property name allows, or undefined when
the definitions cannot be read, the property does not exist or it takes any value. Read-only. Optional.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string[] | undefined>
Implementation of
Section titled “Implementation of”Source.getOrgPropertyValues
getProperties()
Section titled “getProperties()”getProperties():
Promise<Record<string,string|string[]>>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:357
The repository’s custom property values as they are now, by property name. A property that is not set is left out. Read-only. Optional — providers without custom properties omit this.
Returns
Section titled “Returns”Promise<Record<string, string | string[]>>
Implementation of
Section titled “Implementation of”Source.getProperties
getPullRequest()
Section titled “getPullRequest()”getPullRequest(
number,repo?):Promise<PullRequest>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:399
Fetch a pull request by number. The repo override lets callers look up
a PR in a different repo than the one the plugin is scoped to — useful
when the cleanup command targets another repo’s PR (e.g. docs PR from
the holocron repo context).
Optional — providers without a PR concept omit this.
Parameters
Section titled “Parameters”number
Section titled “number”number
string
Returns
Section titled “Returns”Promise<PullRequest>
Implementation of
Section titled “Implementation of”Source.getPullRequest
getPullRequestChecks()
Section titled “getPullRequestChecks()”getPullRequestChecks(
number,repo?,required?):Promise<PullRequestChecks>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:456
The verdict of the aggregate check (ci / Required checks) on a pull request’s newest commit, read each time it
is asked, with the checks that failed. close work reads it before it marks a pull request ready. Optional —
providers without checks omit this.
With required (a repo whose ci.aggregate is none: nothing posts the aggregate) the provider reads the
commit’s check runs and commit statuses instead and answers whether those required checks are green, whatever
the optional ones do (their failures are still listed, with required: false). Without it the read is the
aggregate’s, as it always was.
Parameters
Section titled “Parameters”number
Section titled “number”number
string
required?
Section titled “required?”SourceRequiredChecks
Returns
Section titled “Returns”Promise<PullRequestChecks>
Implementation of
Section titled “Implementation of”Source.getPullRequestChecks
getRepo()
Section titled “getRepo()”getRepo():
Promise<RepoRef>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:145
Returns the repo’s owner, name and default branch.
Returns
Section titled “Returns”Promise<RepoRef>
Implementation of
Section titled “Implementation of”Source.getRepo
getRepoInfo()
Section titled “getRepoInfo()”getRepoInfo():
Promise<SourceRepoInfo>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:353
The repository’s description, homepage, default branch, topics and merge/feature settings as they are now. Read-only. Optional — providers that cannot report them omit this.
Returns
Section titled “Returns”Promise<SourceRepoInfo>
Implementation of
Section titled “Implementation of”Source.getRepoInfo
getRulesetDetail()
Section titled “getRulesetDetail()”getRulesetDetail(
id):Promise<SourceRulesetDetail>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:376
One ruleset in full: its enforcement, the types of its rules and the status checks it requires. Read-only. Optional — providers without rulesets omit this.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<SourceRulesetDetail>
Implementation of
Section titled “Implementation of”Source.getRulesetDetail
getSecurity()
Section titled “getSecurity()”getSecurity():
Promise<SourceSecurity>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:380
Which security features are on. A feature the provider cannot report (the token cannot see it, the plan lacks it) is left out rather than reported as off. Read-only. Optional — providers without security toggles omit this.
Returns
Section titled “Returns”Promise<SourceSecurity>
Implementation of
Section titled “Implementation of”Source.getSecurity
inspectRelaySource()
Section titled “inspectRelaySource()”inspectRelaySource(
input):Promise<RelaySourceState>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:130
Reads the relay source’s webhook back, changing nothing. GitHub never returns the secret, so hasSecret is left out.
Parameters
Section titled “Parameters”InspectRelaySourceInput
Returns
Section titled “Returns”Promise<RelaySourceState>
Implementation of
Section titled “Implementation of”Source.inspectRelaySource
listBranches()
Section titled “listBranches()”listBranches(
repo?):Promise<SourceBranch[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:415
Every branch on the remote, with the commit each points at. Optional — providers without branches omit this.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<SourceBranch[]>
Implementation of
Section titled “Implementation of”Source.listBranches
listCheckRuns()
Section titled “listCheckRuns()”listCheckRuns(
ref,repo?):Promise<SourceCheckRun[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:465
Every check run on a commit, whoever posted it, as the aggregate reads them (reconcile ci). Optional —
providers without checks omit this.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<SourceCheckRun[]>
Implementation of
Section titled “Implementation of”Source.listCheckRuns
listCommitStatuses()
Section titled “listCommitStatuses()”listCommitStatuses(
ref,repo?):Promise<SourceCommitStatus[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:469
The commit statuses on a commit, newest first (a context that posted twice appears twice). Optional — providers without commit statuses omit this.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<SourceCommitStatus[]>
Implementation of
Section titled “Implementation of”Source.listCommitStatuses
listLabels()
Section titled “listLabels()”listLabels():
Promise<LabelDef[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:362
The repository’s labels as they are now. Read-only. Optional — providers without labels omit this.
Returns
Section titled “Returns”Promise<LabelDef[]>
Implementation of
Section titled “Implementation of”Source.listLabels
listOrgVariables()
Section titled “listOrgVariables()”listOrgVariables(
org):Promise<Record<string, {value:string;visibility:"private"|"all"|"selected"; }>>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:341
The organization’s Actions variables as they are now, by name, with each value and the repositories that can read
it (selected is a list this interface does not manage). Read-only. Throws MissingTokenError when the
provider has no token that can read them.
Optional — providers without organization variables omit this.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Record<string, { value: string; visibility: "private" | "all" | "selected"; }>>
Implementation of
Section titled “Implementation of”Source.listOrgVariables
listPullRequestCommits()
Section titled “listPullRequestCommits()”listPullRequestCommits(
number,repo?):Promise<string[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:433
The commit SHAs of one pull request, in commit order. A squash-merged branch is not an ancestor of the base, so this is how a local tip is matched to a PR whose head commit is not in the checkout. Optional — providers without a PR concept omit this.
Parameters
Section titled “Parameters”number
Section titled “number”number
string
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”Source.listPullRequestCommits
listPullRequestFiles()
Section titled “listPullRequestFiles()”listPullRequestFiles(
number,repo?):Promise<string[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:437
The paths one pull request changes, as the repository spells them (a renamed file lists both its new and its old
path), each once. A provider that caps the list returns what it has. update work reads the changed folders from
it for the area labels. Optional — providers without a PR concept omit this.
Parameters
Section titled “Parameters”number
Section titled “number”number
string
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”Source.listPullRequestFiles
listPullRequests()
Section titled “listPullRequests()”listPullRequests(
state,repo?):Promise<PullRequest[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:403
Every pull request in one state, newest first. closed includes the merged ones (merged tells them
apart). Optional — providers without a PR concept omit this.
Parameters
Section titled “Parameters”"closed" | "open"
string
Returns
Section titled “Returns”Promise<PullRequest[]>
Implementation of
Section titled “Implementation of”Source.listPullRequests
listRulesets()
Section titled “listRulesets()”listRulesets():
Promise<Ruleset[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:151
Lists the repo’s rulesets.
Returns
Section titled “Returns”Promise<Ruleset[]>
Implementation of
Section titled “Implementation of”Source.listRulesets
listTeamAccess()
Section titled “listTeamAccess()”listTeamAccess():
Promise<object[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:371
The teams that have access to the repository, with each team’s permission. Read-only. Optional — providers without a team concept omit this.
Returns
Section titled “Returns”Promise<object[]>
Implementation of
Section titled “Implementation of”Source.listTeamAccess
listVariables()
Section titled “listVariables()”listVariables():
Promise<Record<string,string>>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:336
The repository’s Actions variables as they are now, by name, with their values. Read-only. Optional — providers without Actions variables omit this.
Returns
Section titled “Returns”Promise<Record<string, string>>
Implementation of
Section titled “Implementation of”Source.listVariables
listWorkflowFiles()
Section titled “listWorkflowFiles()”listWorkflowFiles():
Promise<string[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:212
Lists the .yml and .yaml files in .github/workflows, sorted by name; empty when the folder is missing.
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”Source.listWorkflowFiles
markReady()
Section titled “markReady()”markReady(
number,repo?):Promise<boolean>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:452
Takes a draft pull request out of draft. Idempotent: one that is not a draft (or is closed or merged) is
left as it is and reported as false. Optional — providers without drafts omit this.
Parameters
Section titled “Parameters”number
Section titled “number”number
string
Returns
Section titled “Returns”Promise<boolean>
true when the pull request was a draft and now is not.
Implementation of
Section titled “Implementation of”Source.markReady
protectBranch()
Section titled “protectBranch()”protectBranch(
branch,payload):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:172
Classic branch protection — fallback for private repos on free plans where the Rulesets API (requires Team+) returns 403.
Parameters
Section titled “Parameters”branch
Section titled “branch”string
payload
Section titled “payload”Record<string, unknown>
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.protectBranch
readFile()
Section titled “readFile()”readFile(
path,repo?):Promise<SourceFile|null>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:294
Read one file from a repository (default: this one), with the version a later writeFile must
hand back. null when the file does not exist.
Optional — providers that cannot read file contents omit this.
Parameters
Section titled “Parameters”string
string = ...
Returns
Section titled “Returns”Promise<SourceFile | null>
Implementation of
Section titled “Implementation of”Source.readFile
readPullRequestState()
Section titled “readPullRequestState()”readPullRequestState(
number,repo?,required?):Promise<PullRequestState|undefined>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:407
One pull request as the PR forum’s post is rendered from it (holocron sync prs): the pull request, its reviews and
the checks of its head commit, read now. undefined when the repository has no such pull request. With required
(a repo whose ci.aggregate is none) the “CI” of the state is those required checks’ verdict, else the aggregate’s.
Optional — providers without a PR concept omit this.
Parameters
Section titled “Parameters”number
Section titled “number”number
string
required?
Section titled “required?”SourceRequiredChecks
Returns
Section titled “Returns”Promise<PullRequestState | undefined>
Implementation of
Section titled “Implementation of”Source.readPullRequestState
readWorkflowFile()
Section titled “readWorkflowFile()”readWorkflowFile(
name):Promise<string|null>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:223
Reads a workflow file’s text, or null when it does not exist.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string | null>
Implementation of
Section titled “Implementation of”Source.readWorkflowFile
removeWorkflowFile()
Section titled “removeWorkflowFile()”removeWorkflowFile(
name):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:239
Removes a workflow file; a file that is already gone is not an error.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.removeWorkflowFile
syncDescription()
Section titled “syncDescription()”syncDescription(
description):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:384
Set the repository description. Optional — providers that don’t support setting descriptions omit this.
Parameters
Section titled “Parameters”description
Section titled “description”string
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncDescription
syncHomepage()
Section titled “syncHomepage()”syncHomepage(
homepage):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:389
Set the repository homepage URL (the “Website” field on the repo landing page). Optional — providers that don’t support setting a homepage omit this.
Parameters
Section titled “Parameters”homepage
Section titled “homepage”string
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncHomepage
syncLabels()
Section titled “syncLabels()”syncLabels(
canonical,stale):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:254
Idempotently sync repo labels to a canonical set. Creates missing labels, patches color/description drift, deletes stale labels. Optional — providers that have no label concept omit this.
Parameters
Section titled “Parameters”canonical
Section titled “canonical”readonly LabelDef[]
readonly string[]
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncLabels
syncOrgVariables()
Section titled “syncOrgVariables()”syncOrgVariables(
org,variables,opts?):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:323
The same for the organization’s variables, each with the repositories that can read it (all or private).
Optional — providers without organization variables omit this.
Parameters
Section titled “Parameters”string
variables
Section titled “variables”Record<string, { value: string; visibility: "all" | "private"; }>
dryRun?
Section titled “dryRun?”boolean
prune?
Section titled “prune?”boolean
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncOrgVariables
syncProperties()
Section titled “syncProperties()”syncProperties(
values):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:262
Set org-level custom property values on the repo. string[] for
multi_select properties, plain string for everything else.
Optional — providers that don’t support custom properties omit this.
Parameters
Section titled “Parameters”values
Section titled “values”Record<string, string | string[]>
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncProperties
syncTeams()
Section titled “syncTeams()”syncTeams(
teams):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:284
Sync GitHub team repository access. String shorthand defaults to push.
Optional — providers without a team concept omit this.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncTeams
syncTopics()
Section titled “syncTopics()”syncTopics(
topics):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:312
Replace the repo’s topic set with the supplied list. Optional — providers that don’t support topics omit this.
Parameters
Section titled “Parameters”topics
Section titled “topics”string[]
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncTopics
syncVariables()
Section titled “syncVariables()”syncVariables(
variables,opts?):Promise<string>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:316
Bring the repository’s Actions variables in line with the declared ones: create what is missing, update what
differs, leave the rest. With prune, also delete the ones the declaration does not name. With dryRun, read the current
state and report what would change without writing. Returns a summary.
Optional — providers without Actions variables omit this.
Parameters
Section titled “Parameters”variables
Section titled “variables”Record<string, string>
dryRun?
Section titled “dryRun?”boolean
prune?
Section titled “prune?”boolean
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Source.syncVariables
teamMembers()
Section titled “teamMembers()”teamMembers(
teamSlug,org?):Promise<SourceTeamMember[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:288
The members of a team in org (default: the repo’s organisation), by the provider’s own stable id (for GitHub, the
numeric user id, which survives a rename) and current login.
Optional — providers without a team concept omit this.
Parameters
Section titled “Parameters”teamSlug
Section titled “teamSlug”string
string = ...
Returns
Section titled “Returns”Promise<SourceTeamMember[]>
Implementation of
Section titled “Implementation of”Source.teamMembers
updateCheckRun()
Section titled “updateCheckRun()”updateCheckRun(
id,write,repo?):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:477
Changes a check run this caller posted. A provider that will not reopen a completed run throws. Optional — providers that cannot post checks omit this.
Parameters
Section titled “Parameters”number
SourceCheckRunWrite
string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.updateCheckRun
updatePullRequest()
Section titled “updatePullRequest()”updatePullRequest(
number,patch,repo?):Promise<PullRequestResult>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:448
Changes a pull request: a field not in the patch is left alone and nothing is cleared unless the patch says so. Optional — providers without pull requests omit this.
Parameters
Section titled “Parameters”number
Section titled “number”number
PullRequestPatch
string
Returns
Section titled “Returns”Promise<PullRequestResult>
Implementation of
Section titled “Implementation of”Source.updatePullRequest
updateRepoSettings()
Section titled “updateRepoSettings()”updateRepoSettings(
settings):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:168
Updates the repo’s settings.
Parameters
Section titled “Parameters”settings
Section titled “settings”RepoSettings
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.updateRepoSettings
updateRuleset()
Section titled “updateRuleset()”updateRuleset(
id,payload):Promise<Ruleset>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:163
Updates the ruleset with the given id from the payload.
Parameters
Section titled “Parameters”number
payload
Section titled “payload”Record<string, unknown>
Returns
Section titled “Returns”Promise<Ruleset>
Implementation of
Section titled “Implementation of”Source.updateRuleset
whoami()
Section titled “whoami()”whoami():
Promise<{login:string; }>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:139
Auth sanity-check. Throws ProviderApiError on auth failure.
Returns
Section titled “Returns”Promise<{ login: string; }>
Implementation of
Section titled “Implementation of”Source.whoami
writeFile()
Section titled “writeFile()”writeFile(
path,content,opts):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:298
Create or replace one file in a single commit. Pass the version readFile returned when
replacing, and leave it out when creating: a write on top of a version that has since changed is
refused (throws a ProviderApiError with status 409 or 422), so two writers cannot overwrite each other.
Optional — providers that cannot write file contents omit this.
Parameters
Section titled “Parameters”string
content
Section titled “content”string
message
Section titled “message”string
string
version?
Section titled “version?”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.writeFile
writeRepoFile()
Section titled “writeRepoFile()”writeRepoFile(
path,contents):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:248
Write an arbitrary file relative to the repo root. Used for
provisioning config files that live outside .github/workflows/
(e.g. .github/dependabot.yml).
Parameters
Section titled “Parameters”string
contents
Section titled “contents”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.writeRepoFile
writeWorkflowFile()
Section titled “writeWorkflowFile()”writeWorkflowFile(
name,contents):Promise<void>
Defined in: plugins/holocron-plugin-github/src/capabilities/source.ts:233
Writes a workflow file, creating .github/workflows first when needed.
Parameters
Section titled “Parameters”string
contents
Section titled “contents”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Source.writeWorkflowFile