@voxgig-sdk/github-sdk
v0.0.4
Published
Unofficial generated TypeScript SDK for the GitHub v3 REST public API. Not affiliated with or endorsed by the upstream API provider.
Readme
Github TypeScript SDK
The TypeScript SDK for the Github API — a type-safe, entity-oriented client with full async/await support.
The API is exposed as capitalised, semantic Entities — e.g.
client.Action() — each with a small set of operations (list, load, create, update, remove, patch)
instead of raw URL paths and query parameters. This keeps the surface
predictable and low-friction for both humans and AI agents.
Also generated from this model:
go,go-cli,go-mcp,js,lua,php,py— see the top-level README.
Install
This package is not yet published to npm. Install it from the GitHub
release tag (ts/vX.Y.Z):
Tutorial: your first API call
This tutorial walks through creating a client, listing entities, and loading a specific record.
1. Create a client
import { GithubSDK } from '@voxgig-sdk/github-sdk'
const client = new GithubSDK({
apikey: process.env.GITHUB_APIKEY,
})2. List action records
list() resolves to an array of Action ENTITIES — every operation
resolves to entities, not raw records. Iterate them directly, and call
.data() on one for the record it holds:
const actions = await client.Action().list({ org_id: "example" })
for (const action of actions) {
console.log(action)
}3. Load an action
Action is nested under archive_format, so provide the archive_format.
load() returns the entity directly and throws on failure:
try {
const action = await client.Action().load({
archive_format: 'example_archive_format',
artifact_id: 1,
owner: 'example_owner',
repo: 'example_repo',
})
console.log(action)
} catch (err) {
console.error('load failed:', err)
}4. Create, update, and remove
// Create — returns the created Action ENTITY (.data() for the record)
const created = await client.Action().create({
org_id: 'example_org_id',
access_level: 'example_access_level',
active_caches_count: 1,
active_caches_size_in_bytes: 1,
actor: {},
allows_public_repositories: true,
approval_policy: 'example_approval_policy',
archive_download_url: 'example_archive_download_url',
archive_url: 'example_archive_url',
artifacts_url: 'example_artifacts_url',
assignees_url: 'example_assignees_url',
badge_url: 'example_badge_url',
blobs_url: 'example_blobs_url',
branches_url: 'example_branches_url',
busy: true,
cancel_url: 'example_cancel_url',
check_run_url: 'example_check_run_url',
check_suite_url: 'example_check_suite_url',
code_of_conduct: {},
collaborators_url: 'example_collaborators_url',
comments_url: 'example_comments_url',
commits_url: 'example_commits_url',
compare_url: 'example_compare_url',
completed_at: 'example_completed_at',
conclusion: 'example_conclusion',
contents_url: 'example_contents_url',
contributors_url: 'example_contributors_url',
cpu_cores: 1,
created_at: 'example_created_at',
days: 1,
default: true,
deployments_url: 'example_deployments_url',
description: 'example_description',
display_name: 'example_display_name',
display_title: 'example_display_title',
downloads_url: 'example_downloads_url',
enabled: true,
enabled_repositories: 'example_enabled_repositories',
event: 'example_event',
events_url: 'example_events_url',
expired: true,
expires_at: 'example_expires_at',
fork: true,
forks_url: 'example_forks_url',
full_name: 'example_full_name',
git_commits_url: 'example_git_commits_url',
git_refs_url: 'example_git_refs_url',
git_tags_url: 'example_git_tags_url',
head_branch: 'example_head_branch',
head_commit: {},
head_repository: {},
head_sha: 'example_head_sha',
hooks_url: 'example_hooks_url',
html_url: 'example_html_url',
id: 1,
image_details: {},
inherited: true,
issue_comment_url: 'example_issue_comment_url',
issue_events_url: 'example_issue_events_url',
issues_url: 'example_issues_url',
jobs_url: 'example_jobs_url',
keys_url: 'example_keys_url',
labels: [],
labels_url: 'example_labels_url',
languages_url: 'example_languages_url',
logs_url: 'example_logs_url',
machine_size_details: {},
memory_gb: 1,
merges_url: 'example_merges_url',
milestones_url: 'example_milestones_url',
name: 'example_name',
node_id: 'example_node_id',
notifications_url: 'example_notifications_url',
os: 'example_os',
owner: {},
path: 'example_path',
platform: 'example_platform',
platforms: [],
private: true,
public_ip_enabled: true,
pull_requests: [],
pulls_url: 'example_pulls_url',
ref: 'example_ref',
releases_url: 'example_releases_url',
repository: {},
rerun_url: 'example_rerun_url',
run_id: 1,
run_number: 1,
run_url: 'example_run_url',
run_workflows_from_fork_pull_requests: true,
runner_group_id: 1,
runner_group_name: 'example_runner_group_name',
runner_id: 1,
runner_name: 'example_runner_name',
runners: [],
runners_url: 'example_runners_url',
selected_repository_ids: [],
size_gb: 1,
size_in_bytes: 1,
source: 'example_source',
stargazers_url: 'example_stargazers_url',
started_at: 'example_started_at',
state: 'example_state',
status: 'example_status',
statuses_url: 'example_statuses_url',
storage_gb: 1,
subscribers_url: 'example_subscribers_url',
subscription_url: 'example_subscription_url',
tags_url: 'example_tags_url',
teams_url: 'example_teams_url',
total_count: 1,
trees_url: 'example_trees_url',
triggering_actor: {},
updated_at: 'example_updated_at',
url: 'example_url',
workflow_id: 1,
workflow_name: 'example_workflow_name',
workflow_url: 'example_workflow_url',
})
// Update — the id comes off the returned entity's data()
const updated = await client.Action().update({
org_id: 'example_org_id',
repository_id: 1,
})
// Remove
await client.Action().remove({
hosted_runner_id: 1,
org_id: 'example_org_id',
})Error handling
Entity operations reject on failure, so wrap them in try / catch:
try {
const custompropertys = await client.CustomProperty().list()
console.log(custompropertys)
} catch (err) {
console.error('list failed:', err)
}The low-level direct() method does not throw — it returns the
value or an Error, so check the result before using it:
const result = await client.direct({
path: '/api/resource/{id}',
method: 'GET',
params: { id: 'example_id' },
})
if (result instanceof Error) {
throw result
}How-to guides
Make a direct HTTP request
For endpoints not covered by entity methods:
const result = await client.direct({
path: '/api/resource/{id}',
method: 'GET',
params: { id: 'example' },
})
if (result instanceof Error) {
throw result
}
if (result.ok) {
console.log(result.status) // 200
console.log(result.data) // response body
}Prepare a request without sending it
const fetchdef = await client.prepare({
path: '/api/resource/{id}',
method: 'DELETE',
params: { id: 'example' },
})
// Inspect before sending
console.log(fetchdef.url)
console.log(fetchdef.method)
console.log(fetchdef.headers)Use test mode
Create a mock client for unit testing — no server required:
const client = GithubSDK.test()
const customproperty = await client.CustomProperty().list()
// customproperty is the entity, populated with mock response data
// — call customproperty.data() for the record itself
console.log(customproperty)You can also use the instance method:
const client = new GithubSDK({ apikey: '...' })
const testClient = client.tester()Retain entity state across calls
Entity instances remember their last match and data:
const entity = client.CustomProperty()
// First call runs the operation and stores its result
await entity.list()
// Subsequent calls reuse the stored state
const data = entity.data()
console.log(data)Add custom middleware
Pass features via the extend option:
const logger = {
hooks: {
PreRequest: (ctx: any) => {
console.log('Requesting:', ctx.spec.method, ctx.spec.path)
},
PreResponse: (ctx: any) => {
console.log('Status:', ctx.out.request?.status)
},
},
}
const client = new GithubSDK({
apikey: '...',
extend: [logger],
})Run live tests
Create a .env.local file at the project root:
GITHUB_TEST_LIVE=TRUE
GITHUB_APIKEY=<your-key>Then run:
cd ts && npm testReference
GithubSDK
Constructor
new GithubSDK(options?: {
apikey?: string
base?: string
prefix?: string
suffix?: string
feature?: Record<string, { active: boolean }>
extend?: Feature[]
})| Option | Type | Description |
| --- | --- | --- |
| apikey | string | API key for authentication. |
| base | string | Base URL of the API server. |
| prefix | string | URL path prefix prepended to all requests. |
| suffix | string | URL path suffix appended to all requests. |
| feature | object | Feature activation flags (e.g. { test: { active: true } }). |
| extend | Feature[] | Additional feature instances to load. |
Methods
| Method | Returns | Description |
| --- | --- | --- |
| options() | object | Deep copy of current SDK options. |
| utility() | Utility | Deep copy of the SDK utility object. |
| prepare(fetchargs?) | Promise<FetchDef> | Build an HTTP request definition without sending it. |
| direct(fetchargs?) | Promise<DirectResult> | Build and send an HTTP request. |
| Action(data?) | ActionEntity | Create an Action entity instance. |
| ActionsArtifactAndLogRetention(data?) | ActionsArtifactAndLogRetentionEntity | Create an ActionsArtifactAndLogRetention entity instance. |
| ActionsCacheList(data?) | ActionsCacheListEntity | Create an ActionsCacheList entity instance. |
| ActionsCacheUsageByRepository(data?) | ActionsCacheUsageByRepositoryEntity | Create an ActionsCacheUsageByRepository entity instance. |
| ActionsCacheUsageOrgEnterprise(data?) | ActionsCacheUsageOrgEnterpriseEntity | Create an ActionsCacheUsageOrgEnterprise entity instance. |
| ActionsForkPrContributorApproval(data?) | ActionsForkPrContributorApprovalEntity | Create an ActionsForkPrContributorApproval entity instance. |
| ActionsForkPrWorkflowsPrivateRepo(data?) | ActionsForkPrWorkflowsPrivateRepoEntity | Create an ActionsForkPrWorkflowsPrivateRepo entity instance. |
| ActionsGetDefaultWorkflowPermission(data?) | ActionsGetDefaultWorkflowPermissionEntity | Create an ActionsGetDefaultWorkflowPermission entity instance. |
| ActionsHostedRunner(data?) | ActionsHostedRunnerEntity | Create an ActionsHostedRunner entity instance. |
| ActionsHostedRunnerLimit(data?) | ActionsHostedRunnerLimitEntity | Create an ActionsHostedRunnerLimit entity instance. |
| ActionsOrganizationPermission(data?) | ActionsOrganizationPermissionEntity | Create an ActionsOrganizationPermission entity instance. |
| ActionsPublicKey(data?) | ActionsPublicKeyEntity | Create an ActionsPublicKey entity instance. |
| ActionsRepositoryPermission(data?) | ActionsRepositoryPermissionEntity | Create an ActionsRepositoryPermission entity instance. |
| ActionsSecret(data?) | ActionsSecretEntity | Create an ActionsSecret entity instance. |
| ActionsVariable(data?) | ActionsVariableEntity | Create an ActionsVariable entity instance. |
| ActionsWorkflowAccessToRepository(data?) | ActionsWorkflowAccessToRepositoryEntity | Create an ActionsWorkflowAccessToRepository entity instance. |
| Activity(data?) | ActivityEntity | Create an Activity entity instance. |
| Add(data?) | AddEntity | Create an Add entity instance. |
| ApiInsightsRouteStat(data?) | ApiInsightsRouteStatEntity | Create an ApiInsightsRouteStat entity instance. |
| ApiInsightsSubjectStat(data?) | ApiInsightsSubjectStatEntity | Create an ApiInsightsSubjectStat entity instance. |
| ApiInsightsSummaryStat(data?) | ApiInsightsSummaryStatEntity | Create an ApiInsightsSummaryStat entity instance. |
| ApiInsightsTimeStat(data?) | ApiInsightsTimeStatEntity | Create an ApiInsightsTimeStat entity instance. |
| ApiInsightsUserStat(data?) | ApiInsightsUserStatEntity | Create an ApiInsightsUserStat entity instance. |
| ApiOverview(data?) | ApiOverviewEntity | Create an ApiOverview entity instance. |
| App(data?) | AppEntity | Create an App entity instance. |
| Artifact(data?) | ArtifactEntity | Create an Artifact entity instance. |
| Assignee(data?) | AssigneeEntity | Create an Assignee entity instance. |
| AuthenticationToken(data?) | AuthenticationTokenEntity | Create an AuthenticationToken entity instance. |
| Authorization(data?) | AuthorizationEntity | Create an Authorization entity instance. |
| Autolink(data?) | AutolinkEntity | Create an Autolink entity instance. |
| BaseGist(data?) | BaseGistEntity | Create a BaseGist entity instance. |
| BillingUsageReport(data?) | BillingUsageReportEntity | Create a BillingUsageReport entity instance. |
| BillingUsageReportUser(data?) | BillingUsageReportUserEntity | Create a BillingUsageReportUser entity instance. |
| Blob(data?) | BlobEntity | Create a Blob entity instance. |
| Block(data?) | BlockEntity | Create a Block entity instance. |
| Branch(data?) | BranchEntity | Create a Branch entity instance. |
| BranchProtection(data?) | BranchProtectionEntity | Create a BranchProtection entity instance. |
| BranchRestrictionPolicy(data?) | BranchRestrictionPolicyEntity | Create a BranchRestrictionPolicy entity instance. |
| BranchShort(data?) | BranchShortEntity | Create a BranchShort entity instance. |
| BranchWithProtection(data?) | BranchWithProtectionEntity | Create a BranchWithProtection entity instance. |
| Campaign(data?) | CampaignEntity | Create a Campaign entity instance. |
| Check(data?) | CheckEntity | Create a Check entity instance. |
| CheckAnnotation(data?) | CheckAnnotationEntity | Create a CheckAnnotation entity instance. |
| CheckAutomatedSecurityFix(data?) | CheckAutomatedSecurityFixEntity | Create a CheckAutomatedSecurityFix entity instance. |
| CheckRun(data?) | CheckRunEntity | Create a CheckRun entity instance. |
| CheckSuite(data?) | CheckSuiteEntity | Create a CheckSuite entity instance. |
| CheckSuitePreference(data?) | CheckSuitePreferenceEntity | Create a CheckSuitePreference entity instance. |
| Classroom(data?) | ClassroomEntity | Create a Classroom entity instance. |
| ClassroomAcceptedAssignment(data?) | ClassroomAcceptedAssignmentEntity | Create a ClassroomAcceptedAssignment entity instance. |
| ClassroomAssignment(data?) | ClassroomAssignmentEntity | Create a ClassroomAssignment entity instance. |
| ClassroomAssignmentGrade(data?) | ClassroomAssignmentGradeEntity | Create a ClassroomAssignmentGrade entity instance. |
| Clone(data?) | CloneEntity | Create a Clone entity instance. |
| CodeFrequency(data?) | CodeFrequencyEntity | Create a CodeFrequency entity instance. |
| CodeFrequencyStat(data?) | CodeFrequencyStatEntity | Create a CodeFrequencyStat entity instance. |
| CodeOfConduct(data?) | CodeOfConductEntity | Create a CodeOfConduct entity instance. |
| CodeScanning(data?) | CodeScanningEntity | Create a CodeScanning entity instance. |
| CodeScanningAlert(data?) | CodeScanningAlertEntity | Create a CodeScanningAlert entity instance. |
| CodeScanningAlertInstance(data?) | CodeScanningAlertInstanceEntity | Create a CodeScanningAlertInstance entity instance. |
| CodeScanningAlertItem(data?) | CodeScanningAlertItemEntity | Create a CodeScanningAlertItem entity instance. |
| CodeScanningAnalysi(data?) | CodeScanningAnalysiEntity | Create a CodeScanningAnalysi entity instance. |
| CodeScanningAnalysisDeletion(data?) | CodeScanningAnalysisDeletionEntity | Create a CodeScanningAnalysisDeletion entity instance. |
| CodeScanningAutofix(data?) | CodeScanningAutofixEntity | Create a CodeScanningAutofix entity instance. |
| CodeScanningAutofixCommit(data?) | CodeScanningAutofixCommitEntity | Create a CodeScanningAutofixCommit entity instance. |
| CodeScanningCodeqlDatabase(data?) | CodeScanningCodeqlDatabaseEntity | Create a CodeScanningCodeqlDatabase entity instance. |
| CodeScanningDefaultSetup(data?) | CodeScanningDefaultSetupEntity | Create a CodeScanningDefaultSetup entity instance. |
| CodeScanningOrganizationAlertItem(data?) | CodeScanningOrganizationAlertItemEntity | Create a CodeScanningOrganizationAlertItem entity instance. |
| CodeScanningSarifsStatus(data?) | CodeScanningSarifsStatusEntity | Create a CodeScanningSarifsStatus entity instance. |
| CodeScanningVariantAnalysi(data?) | CodeScanningVariantAnalysiEntity | Create a CodeScanningVariantAnalysi entity instance. |
| CodeScanningVariantAnalysisRepoTask(data?) | CodeScanningVariantAnalysisRepoTaskEntity | Create a CodeScanningVariantAnalysisRepoTask entity instance. |
| CodeSecurity(data?) | CodeSecurityEntity | Create a CodeSecurity entity instance. |
| CodeSecurityConfiguration(data?) | CodeSecurityConfigurationEntity | Create a CodeSecurityConfiguration entity instance. |
| CodeSecurityConfigurationRepository(data?) | CodeSecurityConfigurationRepositoryEntity | Create a CodeSecurityConfigurationRepository entity instance. |
| CodeSecurityDefaultConfiguration(data?) | CodeSecurityDefaultConfigurationEntity | Create a CodeSecurityDefaultConfiguration entity instance. |
| CodeownersError(data?) | CodeownersErrorEntity | Create a CodeownersError entity instance. |
| Codespace(data?) | CodespaceEntity | Create a Codespace entity instance. |
| Collaborator(data?) | CollaboratorEntity | Create a Collaborator entity instance. |
| CombinedBillingUsage(data?) | CombinedBillingUsageEntity | Create a CombinedBillingUsage entity instance. |
| CombinedCommitStatus(data?) | CombinedCommitStatusEntity | Create a CombinedCommitStatus entity instance. |
| Commit(data?) | CommitEntity | Create a Commit entity instance. |
| CommitActivity(data?) | CommitActivityEntity | Create a CommitActivity entity instance. |
| CommitComment(data?) | CommitCommentEntity | Create a CommitComment entity instance. |
| CommitComparison(data?) | CommitComparisonEntity | Create a CommitComparison entity instance. |
| CommunityProfile(data?) | CommunityProfileEntity | Create a CommunityProfile entity instance. |
| ContentFile(data?) | ContentFileEntity | Create a ContentFile entity instance. |
| ContentTraffic(data?) | ContentTrafficEntity | Create a ContentTraffic entity instance. |
| Contributor(data?) | ContributorEntity | Create a Contributor entity instance. |
| Copilot(data?) | CopilotEntity | Create a Copilot entity instance. |
| CopilotOrganizationDetail(data?) | CopilotOrganizationDetailEntity | Create a CopilotOrganizationDetail entity instance. |
| CopilotUsageMetricsDay(data?) | CopilotUsageMetricsDayEntity | Create a CopilotUsageMetricsDay entity instance. |
| Credential(data?) | CredentialEntity | Create a Credential entity instance. |
| CustomProperty(data?) | CustomPropertyEntity | Create a CustomProperty entity instance. |
| CustomPropertyValue(data?) | CustomPropertyValueEntity | Create a CustomPropertyValue entity instance. |
| Dependabot(data?) | DependabotEntity | Create a Dependabot entity instance. |
| DependabotAlert(data?) | DependabotAlertEntity | Create a DependabotAlert entity instance. |
| DependabotAlertWithRepository(data?) | DependabotAlertWithRepositoryEntity | Create a DependabotAlertWithRepository entity instance. |
| DependabotPublicKey(data?) | DependabotPublicKeyEntity | Create a DependabotPublicKey entity instance. |
| DependabotRepositoryAccessDetail(data?) | DependabotRepositoryAccessDetailEntity | Create a DependabotRepositoryAccessDetail entity instance. |
| DependabotSecret(data?) | DependabotSecretEntity | Create a DependabotSecret entity instance. |
| DependencyGraph(data?) | DependencyGraphEntity | Create a DependencyGraph entity instance. |
| DependencyGraphDiff(data?) | DependencyGraphDiffEntity | Create a DependencyGraphDiff entity instance. |
| DependencyGraphSpdxSbom(data?) | DependencyGraphSpdxSbomEntity | Create a DependencyGraphSpdxSbom entity instance. |
| DeployKey(data?) | DeployKeyEntity | Create a DeployKey entity instance. |
| Deployment(data?) | DeploymentEntity | Create a Deployment entity instance. |
| DeploymentBranchPolicy(data?) | DeploymentBranchPolicyEntity | Create a DeploymentBranchPolicy entity instance. |
| DeploymentProtectionRule(data?) | DeploymentProtectionRuleEntity | Create a DeploymentProtectionRule entity instance. |
| DeploymentStatus(data?) | DeploymentStatusEntity | Create a DeploymentStatus entity instance. |
| DiffEntry(data?) | DiffEntryEntity | Create a DiffEntry entity instance. |
| Email(data?) | EmailEntity | Create an Email entity instance. |
| Emoji(data?) | EmojiEntity | Create an Emoji entity instance. |
| EmptyObject(data?) | EmptyObjectEntity | Create an EmptyObject entity instance. |
| EnterpriseTeam(data?) | EnterpriseTeamEntity | Create an EnterpriseTeam entity instance. |
| EnterpriseTeamMembership(data?) | EnterpriseTeamMembershipEntity | Create an EnterpriseTeamMembership entity instance. |
| Environment(data?) | EnvironmentEntity | Create an Environment entity instance. |
| EnvironmentApproval(data?) | EnvironmentApprovalEntity | Create an EnvironmentApproval entity instance. |
| Event(data?) | EventEntity | Create an Event entity instance. |
| Feed(data?) | FeedEntity | Create a Feed entity instance. |
| FileCommit(data?) | FileCommitEntity | Create a FileCommit entity instance. |
| Follower(data?) | FollowerEntity | Create a Follower entity instance. |
| Following(data?) | FollowingEntity | Create a Following entity instance. |
| FullRepository(data?) | FullRepositoryEntity | Create a FullRepository entity instance. |
| Gist(data?) | GistEntity | Create a Gist entity instance. |
| GistComment(data?) | GistCommentEntity | Create a GistComment entity instance. |
| GistCommit(data?) | GistCommitEntity | Create a GistCommit entity instance. |
| GistSimple(data?) | GistSimpleEntity | Create a GistSimple entity instance. |
| Git(data?) | GitEntity | Create a Git entity instance. |
| GitCommit(data?) | GitCommitEntity | Create a GitCommit entity instance. |
| GitRef(data?) | GitRefEntity | Create a GitRef entity instance. |
| GitTag(data?) | GitTagEntity | Create a GitTag entity instance. |
| GitTree(data?) | GitTreeEntity | Create a GitTree entity instance. |
| Gitignore(data?) | GitignoreEntity | Create a Gitignore entity instance. |
| GitignoreTemplate(data?) | GitignoreTemplateEntity | Create a GitignoreTemplate entity instance. |
| GlobalAdvisory(data?) | GlobalAdvisoryEntity | Create a GlobalAdvisory entity instance. |
| GpgKey(data?) | GpgKeyEntity | Create a GpgKey entity instance. |
| Hook(data?) | HookEntity | Create a Hook entity instance. |
| HookDelivery(data?) | HookDeliveryEntity | Create a HookDelivery entity instance. |
| HookDeliveryItem(data?) | HookDeliveryItemEntity | Create a HookDeliveryItem entity instance. |
| HostedCompute(data?) | HostedComputeEntity | Create a HostedCompute entity instance. |
| Hovercard(data?) | HovercardEntity | Create a Hovercard entity instance. |
| Import(data?) | ImportEntity | Create an Import entity instance. |
| Installation(data?) | InstallationEntity | Create an Installation entity instance. |
| InstallationToken(data?) | InstallationTokenEntity | Create an InstallationToken entity instance. |
| Integration(data?) | IntegrationEntity | Create an Integration entity instance. |
| IntegrationInstallation(data?) | IntegrationInstallationEntity | Create an IntegrationInstallation entity instance. |
| Interaction(data?) | InteractionEntity | Create an Interaction entity instance. |
| InteractionLimit(data?) | InteractionLimitEntity | Create an InteractionLimit entity instance. |
| Issue(data?) | IssueEntity | Create an Issue entity instance. |
| IssueType(data?) | IssueTypeEntity | Create an IssueType entity instance. |
| Job(data?) | JobEntity | Create a Job entity instance. |
| Key(data?) | KeyEntity | Create a Key entity instance. |
| Label(data?) | LabelEntity | Create a Label entity instance. |
| Language(data?) | LanguageEntity | Create a Language entity instance. |
| License(data?) | LicenseEntity | Create a License entity instance. |
| Markdown(data?) | MarkdownEntity | Create a Markdown entity instance. |
| MarketplaceListingPlan(data?) | MarketplaceListingPlanEntity | Create a MarketplaceListingPlan entity instance. |
| MarketplacePurchase(data?) | MarketplacePurchaseEntity | Create a MarketplacePurchase entity instance. |
| Member(data?) | MemberEntity | Create a Member entity instance. |
| Membership(data?) | MembershipEntity | Create a Membership entity instance. |
| MergedUpstream(data?) | MergedUpstreamEntity | Create a MergedUpstream entity instance. |
| Meta(data?) | MetaEntity | Create a Meta entity instance. |
| Metaroot(data?) | MetarootEntity | Create a Metaroot entity instance. |
| Migration(data?) | MigrationEntity | Create a Migration entity instance. |
| Milestone(data?) | MilestoneEntity | Create a Milestone entity instance. |
| MinimalRepository(data?) | MinimalRepositoryEntity | Create a MinimalRepository entity instance. |
| NetworkConfiguration(data?) | NetworkConfigurationEntity | Create a NetworkConfiguration entity instance. |
| NetworkSetting(data?) | NetworkSettingEntity | Create a NetworkSetting entity instance. |
| OidcCustomSub(data?) | OidcCustomSubEntity | Create an OidcCustomSub entity instance. |
| OidcCustomSubRepo(data?) | OidcCustomSubRepoEntity | Create an OidcCustomSubRepo entity instance. |
| Org(data?) | OrgEntity | Create an Org entity instance. |
| OrgHook(data?) | OrgHookEntity | Create an OrgHook entity instance. |
| OrgMembership(data?) | OrgMembershipEntity | Create an OrgMembership entity instance. |
| OrgPrivateRegistryConfiguration(data?) | OrgPrivateRegistryConfigurationEntity | Create an OrgPrivateRegistryConfiguration entity instance. |
| OrgPrivateRegistryConfigurationWithSelectedRepository(data?) | OrgPrivateRegistryConfigurationWithSelectedRepositoryEntity | Create an OrgPrivateRegistryConfigurationWithSelectedRepository entity instance. |
| OrgRepoCustomPropertyValue(data?) | OrgRepoCustomPropertyValueEntity | Create an OrgRepoCustomPropertyValue entity instance. |
| Organization(data?) | OrganizationEntity | Create an Organization entity instance. |
| OrganizationActionsSecret(data?) | OrganizationActionsSecretEntity | Create an OrganizationActionsSecret entity instance. |
| OrganizationActionsVariable(data?) | OrganizationActionsVariableEntity | Create an OrganizationActionsVariable entity instance. |
| OrganizationDependabotSecret(data?) | OrganizationDependabotSecretEntity | Create an OrganizationDependabotSecret entity instance. |
| OrganizationInvitation(data?) | OrganizationInvitationEntity | Create an OrganizationInvitation entity instance. |
| OrganizationProgrammaticAccessGrant(data?) | OrganizationProgrammaticAccessGrantEntity | Create an OrganizationProgrammaticAccessGrant entity instance. |
| OrganizationRole(data?) | OrganizationRoleEntity | Create an OrganizationRole entity instance. |
| OrganizationSecretScanningAlert(data?) | OrganizationSecretScanningAlertEntity | Create an OrganizationSecretScanningAlert entity instance. |
| OutsideCollaborator(data?) | OutsideCollaboratorEntity | Create an OutsideCollaborator entity instance. |
| Package(data?) | PackageEntity | Create a Package entity instance. |
| Page(data?) | PageEntity | Create a Page entity instance. |
| PageBuild(data?) | PageBuildEntity | Create a PageBuild entity instance. |
| PageBuildStatus(data?) | PageBuildStatusEntity | Create a PageBuildStatus entity instance. |
| PageDeployment(data?) | PageDeploymentEntity | Create a PageDeployment entity instance. |
| PagesDeploymentStatus(data?) | PagesDeploymentStatusEntity | Create a PagesDeploymentStatus entity instance. |
| PagesHealthCheck(data?) | PagesHealthCheckEntity | Create a PagesHealthCheck entity instance. |
| Participation(data?) | ParticipationEntity | Create a Participation entity instance. |
| PendingDeployment(data?) | PendingDeploymentEntity | Create a PendingDeployment entity instance. |
| PorterAuthor(data?) | PorterAuthorEntity | Create a PorterAuthor entity instance. |
| PorterLargeFile(data?) | PorterLargeFileEntity | Create a PorterLargeFile entity instance. |
| PrivateRegistry(data?) | PrivateRegistryEntity | Create a PrivateRegistry entity instance. |
| PrivateUser(data?) | PrivateUserEntity | Create a PrivateUser entity instance. |
| Project(data?) | ProjectEntity | Create a Project entity instance. |
| ProjectCollaboratorPermission(data?) | ProjectCollaboratorPermissionEntity | Create a ProjectCollaboratorPermission entity instance. |
| ProjectColumn(data?) | ProjectColumnEntity | Create a ProjectColumn entity instance. |
| ProjectsClassic(data?) | ProjectsClassicEntity | Create a ProjectsClassic entity instance. |
| ProjectsV2(data?) | ProjectsV2Entity | Create a ProjectsV2 entity instance. |
| ProjectsV2Field(data?) | ProjectsV2FieldEntity | Create a ProjectsV2Field entity instance. |
| ProjectsV2ItemSimple(data?) | ProjectsV2ItemSimpleEntity | Create a ProjectsV2ItemSimple entity instance. |
| ProjectsV2ItemWithContent(data?) | ProjectsV2ItemWithContentEntity | Create a ProjectsV2ItemWithContent entity instance. |
| ProtectedBranch(data?) | ProtectedBranchEntity | Create a ProtectedBranch entity instance. |
| ProtectedBranchAdminEnforced(data?) | ProtectedBranchAdminEnforcedEntity | Create a ProtectedBranchAdminEnforced entity instance. |
| ProtectedBranchPullRequestReview(data?) | ProtectedBranchPullRequestReviewEntity | Create a ProtectedBranchPullRequestReview entity instance. |
| PublicMember(data?) | PublicMemberEntity | Create a PublicMember entity instance. |
| Pull(data?) | PullEntity | Create a Pull entity instance. |
| PullRequestReview(data?) | PullRequestReviewEntity | Create a PullRequestReview entity instance. |
| PullRequestReviewComment(data?) | PullRequestReviewCommentEntity | Create a PullRequestReviewComment entity instance. |
| PullRequestSimple(data?) | PullRequestSimpleEntity | Create a PullRequestSimple entity instance. |
| RateLimit(data?) | RateLimitEntity | Create a RateLimit entity instance. |
| Reaction(data?) | ReactionEntity | Create a Reaction entity instance. |
| Referrer(data?) | ReferrerEntity | Create a Referrer entity instance. |
| Release(data?) | ReleaseEntity | Create a Release entity instance. |
| ReleaseAsset(data?) | ReleaseAssetEntity | Create a ReleaseAsset entity instance. |
| ReleaseNotesContent(data?) | ReleaseNotesContentEntity | Create a ReleaseNotesContent entity instance. |
| Remove(data?) | RemoveEntity | Create a Remove entity instance. |
| Repo(data?) | RepoEntity | Create a Repo entity instance. |
| Repository(data?) | RepositoryEntity | Create a Repository entity instance. |
| RepositoryAdvisory(data?) | RepositoryAdvisoryEntity | Create a RepositoryAdvisory entity instance. |
| RepositoryCollaboratorPermission(data?) | RepositoryCollaboratorPermissionEntity | Create a RepositoryCollaboratorPermission entity instance. |
| RepositoryInvitation(data?) | RepositoryInvitationEntity | Create a RepositoryInvitation entity instance. |
| RepositoryRuleDetailed(data?) | RepositoryRuleDetailedEntity | Create a RepositoryRuleDetailed entity instance. |
| RepositoryRuleset(data?) | RepositoryRulesetEntity | Create a RepositoryRuleset entity instance. |
| RepositorySubscription(data?) | RepositorySubscriptionEntity | Create a RepositorySubscription entity instance. |
| ReviewComment(data?) | ReviewCommentEntity | Create a ReviewComment entity instance. |
| RuleSuite(data?) | RuleSuiteEntity | Create a RuleSuite entity instance. |
| RulesetVersion(data?) | RulesetVersionEntity | Create a RulesetVersion entity instance. |
| RulesetVersionWithState(data?) | RulesetVersionWithStateEntity | Create a RulesetVersionWithState entity instance. |
| Runner(data?) | RunnerEntity | Create a Runner entity instance. |
| RunnerApplication(data?) | RunnerApplicationEntity | Create a RunnerApplication entity instance. |
| RunnerGroup(data?) | RunnerGroupEntity | Create a RunnerGroup entity instance. |
| Search(data?) | SearchEntity | Create a Search entity instance. |
| SecretScanning(data?) | SecretScanningEntity | Create a SecretScanning entity instance. |
| SecretScanningAlert(data?) | SecretScanningAlertEntity | Create a SecretScanningAlert entity instance. |
| SecretScanningLocation(data?) | SecretScanningLocationEntity | Create a SecretScanningLocation entity instance. |
| SecretScanningPatternConfiguration(data?) | SecretScanningPatternConfigurationEntity | Create a SecretScanningPatternConfiguration entity instance. |
| SecretScanningPushProtectionBypass(data?) | SecretScanningPushProtectionBypassEntity | Create a SecretScanningPushProtectionBypass entity instance. |
| SecretScanningScanHistory(data?) | SecretScanningScanHistoryEntity | Create a SecretScanningScanHistory entity instance. |
| SecurityAdvisory(data?) | SecurityAdvisoryEntity | Create a SecurityAdvisory entity instance. |
| SelectedAction(data?) | SelectedActionEntity | Create a SelectedAction entity instance. |
| SelfHostedRunner(data?) | SelfHostedRunnerEntity | Create a SelfHostedRunner entity instance. |
| ShortBlob(data?) | ShortBlobEntity | Create a ShortBlob entity instance. |
| ShortBranch(data?) | ShortBranchEntity | Create a ShortBranch entity instance. |
| SimpleClassroom(data?) | SimpleClassroomEntity | Create a SimpleClassroom entity instance. |
| SimpleClassroomAssignment(data?) | SimpleClassroomAssignmentEntity | Create a SimpleClassroomAssignment entity instance. |
| SocialAccount(data?) | SocialAccountEntity | Create a SocialAccount entity instance. |
| SshSigningKey(data?) | SshSigningKeyEntity | Create a SshSigningKey entity instance. |
| Status(data?) | StatusEntity | Create a Status entity instance. |
| StatusCheckPolicy(data?) | StatusCheckPolicyEntity | Create a StatusCheckPolicy entity instance. |
| Subscriber(data?) | SubscriberEntity | Create a Subscriber entity instance. |
| Tag(data?) | TagEntity | Create a Tag entity instance. |
| TagProtection(data?) | TagProtectionEntity | Create a TagProtection entity instance. |
| Team(data?) | TeamEntity | Create a Team entity instance. |
| TeamSimple(data?) | TeamSimpleEntity | Create a TeamSimple entity instance. |
| Thread(data?) | ThreadEntity | Create a Thread entity instance. |
| ThreadSubscription(data?) | ThreadSubscriptionEntity | Create a ThreadSubscription entity instance. |
| Topic(data?) | TopicEntity | Create a Topic entity instance. |
| User(data?) | UserEntity | Create an User entity instance. |
| UserMarketplacePurchase(data?) | UserMarketplacePurchaseEntity | Create an UserMarketplacePurchase entity instance. |
| View(data?) | ViewEntity | Create a View entity instance. |
| WebhookConfig(data?) | WebhookConfigEntity | Create a WebhookConfig entity instance. |
| Workflow(data?) | WorkflowEntity | Create a Workflow entity instance. |
| WorkflowRun(data?) | WorkflowRunEntity | Create a WorkflowRun entity instance. |
| WorkflowRunUsage(data?) | WorkflowRunUsageEntity | Create a WorkflowRunUsage entity instance. |
| WorkflowUsage(data?) | WorkflowUsageEntity | Create a WorkflowUsage entity instance. |
| tester(testopts?, sdkopts?) | GithubSDK | Create a test-mode client instance. |
Static methods
| Method | Returns | Description |
| --- | --- | --- |
| GithubSDK.test(testopts?, sdkopts?) | GithubSDK | Create a test-mode client. |
Entity interface
All entities share the same interface.
Methods
| Method | Signature | Description |
| --- | --- | --- |
| load | load(reqmatch?, ctrl?): Promise<Entity> | Load a single entity by match criteria. |
| list | list(reqmatch?, ctrl?): Promise<Entity[]> | List entities matching the criteria. |
| create | create(reqdata?, ctrl?): Promise<Entity> | Create a new entity. |
| update | update(reqdata?, ctrl?): Promise<Entity> | Update an existing entity. |
| remove | remove(reqmatch?, ctrl?): Promise<void> | Remove an entity. |
| data | data(data?: Partial<Entity>): Entity | Get or set entity data. |
| match | match(match?: Partial<Entity>): Partial<Entity> | Get or set entity match criteria. |
| make | make(): Entity | Create a new instance with the same options. |
| client | client(): GithubSDK | Return the parent SDK client. |
| entopts | entopts(): object | Return a copy of the entity options. |
Return values
Entity operations resolve to the entity data directly — there is no result envelope:
load,createandupdateresolve to a single entity object.listresolves to an array of entity objects (iterate it directly; there is no.dataand no.ok).removeresolves tovoid.
On a failed request these methods throw, so wrap calls in
try/catch to handle errors. Only direct() returns the result
envelope described below.
DirectResult shape
The direct() method returns:
{
ok: boolean
status: number
headers: object
data: any
}On error, ok is false and an err property contains the error.
FetchDef shape
The prepare() method returns:
{
url: string
method: string
headers: Record<string, string>
body?: any
}Entities
Action
| Field | Description |
| --- | --- |
| MACOS | Total minutes used on macOS runner machines. |
| UBUNTU | Total minutes used on Ubuntu runner machines. |
| WINDOWS | Total minutes used on Windows runner machines. |
| access_level | Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the repository. |
| active_caches_count | The number of active caches in the repository. |
| active_caches_size_in_bytes | The sum of the size in bytes of all the active cache items in the repository. |
| actor | A GitHub user. |
| allow_auto_merge | Whether to allow Auto-merge to be used on pull requests. |
| allow_forking | Whether to allow forking this repo |
| allow_merge_commit | Whether to allow merge commits for pull requests. |
| allow_rebase_merge | Whether to allow rebase merges for pull requests. |
| allow_squash_merge | Whether to allow squash merges for pull requests. |
| allow_update_branch | Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. |
| allowed_actions | The permissions policy that controls the actions and reusable workflows that are allowed to run. |
| allows_public_repositories | |
| anonymous_access_enabled | Whether anonymous git access is enabled for this repository |
| approval_policy | The policy that controls when fork PR workflows require approval from a maintainer. |
| archive_download_url | |
| archive_url | |
| archived | Whether the repository is archived. |
| artifacts_url | The URL to the artifacts for the workflow run. |
| assignees_url | |
| badge_url | |
| blobs_url | |
| branches_url | |
| busy | |
| can_approve_pull_request_reviews | Whether GitHub Actions can approve pull requests. |
| cancel_url | The URL to cancel the workflow run. |
| check_run_url | |
| check_suite_id | The ID of the associated check suite. |
| check_suite_node_id | The node ID of the associated check suite. |
| check_suite_url | The URL to the associated check suite. |
| clone_url | |
| code_of_conduct | Code Of Conduct |
| code_search_index_status | The status of the code search index for this repository |
| collaborators_url | |
| comments_url | |
| commits_url | |
| compare_url | |
| completed_at | The time that the job finished, in ISO 8601 format. |
| conclusion | The outcome of the job. |
| contents_url | |
| contributors_url | |
| cpu_cores | The number of cores. |
| created_at | The time that the job created, in ISO 8601 format. |
| custom_properties | The custom properties that were defined for the repository. |
| days | The number of days to retain artifacts and logs |
| default | |
| default_branch | The default branch of the repository. |
| default_workflow_permissions | The default workflow permissions granted to the GITHUB_TOKEN when running workflows. |
| delete_branch_on_merge | Whether to delete head branches when pull requests are merged |
| deleted_at | |
| deployments_url | |
| description | |
| digest | The SHA256 digest of the artifact. |
| disabled | Returns whether or not this repository disabled. |
| display_name | Display name for this image. |
| display_title | The event-specific title associated with the run or the run-name if set, or the value of run-name if it is set in the workflow. |
| downloads_url | |
| enabled | Whether GitHub Actions is enabled on the repository. |
| enabled_repositories | The policy that controls the repositories in the organization that are allowed to run GitHub Actions. |
| ephemeral | |
| event | |
| events_url | |
| expired | Whether or not the artifact has expired. |
| expires_at | |
| fork | |
| forks | |
| forks_count | |
| forks_url | |
| full_name | The repository owner and name for the cache usage being shown. |
| git_commits_url | |
| git_refs_url | |
| git_tags_url | |
| git_url | |
| github_owned_allowed | Whether GitHub-owned actions are allowed. |
| has_discussions | Whether discussions are enabled. |
| has_downloads | Whether downloads are enabled. |
| has_issues | Whether issues are enabled. |
| has_pages | |
| has_projects | Whether projects are enabled. |
| has_wiki | Whether the wiki is enabled. |
| head_branch | The name of the current branch. |
| head_commit | A commit. |
| head_repository | Minimal Repository |
| head_repository_id | |
| head_sha | The SHA of the head commit that points to the version of the workflow being run. |
| homepage | |
| hooks_url | |
| hosted_runners_url | |
| html_url | |
| id | The ID of the workflow run. |
| image_details | Provides details of a hosted runner image |
| inherited | |
| inherited_allows_public_repositories | |
| inputs | Input keys and values configured in the workflow file. |
| is_template | Whether this repository acts as a template that can be used to generate new repositories. |
| issue_comment_url | |
| issue_events_url | |
| issues_url | |
| jobs_url | The URL to the jobs for the workflow run. |
| keys_url | |
| labels | The names of the custom labels to add to the runner. |
| labels_url | |
| language | |
| languages_url | |
| last_active_on | The time at which the runner was last used, in ISO 8601 format. |
| license | License Simple |
| logs_url | The URL to download the logs for the workflow run. |
| machine_size_details | Provides details of a particular machine spec. |
| macos_12_core | Total minutes used on macOS 12 core runner machines. |
| master_branch | |
| maximum_runners | The maximum amount of hosted runners. |
| memory_gb | The available RAM for the machine spec. |
| merge_commit_message | The default value for a merge commit message. |
| merge_commit_title | The default value for a merge commit title. |
| merges_url | |
| milestones_url | |
| mirror_url | |
| name | The name of the new runner. |
| network_configuration_id | The identifier of a hosted compute network configuration. |
| network_count | |
| node_id | |
| notifications_url | |
| open_issues | |
| open_issues_count | |
| os | The Operating System of the runner. |
| owner | A GitHub user. |
| path | The full path of the workflow |
| patterns_allowed | Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). |
| permissions | |
| platform | The operating system of the image. |
| platforms | |
| previous_attempt_url | The URL to the previous attempted run of this workflow, if one exists. |
| private | Whether the repository is private or public. |
| public_ip_enabled | Whether public IP is enabled for the hosted runners. |
| public_ips | The public IP ranges when public IP is enabled for the hosted runners. |
| pull_requests | Pull requests that are open with a head_sha or head_branch that matches the workflow run. |
| pulls_url | |
| pushed_at | |
| ref | The git reference for the workflow. |
| referenced_workflows | |
| releases_url | |
| repository | Minimal Repository |
| require_approval_for_fork_pr_workflows | Whether workflows triggered by pull requests from forks require approval from a repository administrator to run. |
| rerun_url | The URL to rerun the workflow run. |
| restricted_to_workflows | If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. |
| role_name | |
| run_attempt | Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. |
| run_id | The id of the associated workflow run. |
| run_number | The auto incrementing run number for the workflow run. |
| run_started_at | The start time of the latest run. |
| run_url | |
| run_workflows_from_fork_pull_requests | Whether workflows triggered by pull requests from forks are allowed to run on private repositories. |
| runner_group_id | The ID of the runner group to register the runner to. |
| runner_group_name | The name of the runner group to which this job has been assigned. |
| runner_id | The ID of the runner to which this job has been assigned. |
| runner_name | The name of the runner to which this job has been assigned. |
| runners | List of runner IDs to add to the runner group. |
| runners_url | |
| security_and_analysis | |
| selected_repositories_url | Link to the selected repositories resource for this runner group. |
| selected_repository_ids | The IDs of the repositories that can access the organization variable. |
| selected_workflows | List of workflows the runner group should be allowed to run. |
| send_secrets_and_variables | Whether to make secrets and variables available to workflows triggered by pull requests from forks. |
| send_write_tokens_to_workflows | Whether GitHub Actions can create pull requests or submit approving pull request reviews from a workflow triggered by a fork pull request. |
| sha_pinning_required | Whether actions must be pinned to a full-length commit SHA. |
| size | The size of the repository, in kilobytes. |
| size_gb | Image size in GB. |
| size_in_bytes | The size in bytes of the artifact. |
| source | The image provider. |
| squash_merge_commit_message | The default value for a squash merge commit message: - PR_BODY - default to the pull request's body. |
| squash_merge_commit_title | The default value for a squash merge commit title: - PR_TITLE - default to the pull request's title. |
| ssh_url | |
| stargazers_count | |
| stargazers_url | |
| starred_at | |
| started_at | The time that the job started, in ISO 8601 format. |
| state | |
| status | The phase of the lifecycle that the job is currently in. |
| statuses_url | |
| steps | Steps in this job. |
| storage_gb | The available SSD storage for the machine spec. |
| subscribers_count | |
| subscribers_url | |
| subscription_url | |
| svn_url | |
| tags_url | |
| teams_url | |
| temp_clone_token | |
| topics | |
| total | Total minutes used on all runner machines. |
| total_count | |
| trees_url | |
| triggering_actor | A GitHub user. |
| type | The type of label. |
| ubuntu_16_core | Total minutes used on Ubuntu 16 core runner machines. |
| ubuntu_32_core | Total minutes used on Ubuntu 32 core runner machines. |
| ubuntu_4_core | Total minutes used on Ubuntu 4 core runner machines. |
| ubuntu_64_core | Total minutes used on Ubuntu 64 core runner machines. |
| ubuntu_8_core | Total minutes used on Ubuntu 8 core runner machines. |
| updated_at | The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. |
| url | The URL to the workflow run. |
| use_squash_pr_title_as_default | Whether a squash merge commit can use the pull request title as default. |
| value | The value of the variable. |
| verified_allowed | Whether actions from GitHub Marketplace verified creators are allowed. |
| visibility | The type of repositories in the organization that can access the variable. |
| watchers | |
| watchers_count | |
| web_commit_signoff_required | Whether to require contributors to sign off on web-based commits |
| windows_16_core | Total minutes used on Windows 16 core runner machines. |
| windows_32_core | Total minutes used on Windows 32 core runner machines. |
| windows_4_core | Total minutes used on Windows 4 core runner machines. |
| windows_64_core | Total minutes used on Windows 64 core runner machines. |
| windows_8_core | Total minutes used on Windows 8 core runner machines. |
| work_folder | The working directory to be used for job execution, relative to the runner install directory. |
| workflow_id | The ID of the parent workflow. |
| workflow_name | The name of the workflow. |
| workflow_restrictions_read_only | If true, the restricted_to_workflows and selected_workflows fields cannot be modified. |
| workflow_run | |
| workflow_url | The URL to the workflow. |
Operations: create, list, load, patch, remove, update.
API path: /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
ActionsArtifactAndLogRetention
| Field | Description |
| --- | --- |
| days | The number of days artifacts and logs are retained |
| maximum_allowed_days | The maximum number of days that can be configured |
Operations: load.
API path: /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention
ActionsCacheList
| Field | Description |
| --- | --- |
| created_at | |
| id | |
| key | |
| last_accessed_at | |
| ref | |
| size_in_bytes | |
| version | |
Operations: list, remove.
API path: /repos/{owner}/{repo}/actions/caches
ActionsCacheUsageByRepository
| Field | Description |
| --- | --- |
| active_caches_count | The number of active caches in the repository. |
| active_caches_size_in_bytes | The sum of the size in bytes of all the active cache items in the repository. |
| full_name | The repository owner and name for the cache usage being shown. |
Operations: load.
API path: /repos/{owner}/{repo}/actions/cache/usage
ActionsCacheUsageOrgEnterprise
| Field | Description |
| --- | --- |
| total_active_caches_count | The count of active caches across all repositories of an enterprise or an organization. |
| total_active_caches_size_in_bytes | The total size in bytes of all active cache items across all repositories of an enterprise or an organization. |
Operations: load.
API path: /orgs/{org}/actions/cache/usage
ActionsForkPrContributorApproval
| Field | Description |
| --- | --- |
| approval_policy | The policy that controls when fork PR workflows require approval from a maintainer. |
Operations: load.
API path: /repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval
ActionsForkPrWorkflowsPrivateRepo
| Field | Description |
| --- | --- |
| require_approval_for_fork_pr_workflows | Whether workflows triggered by pull requests from forks require approval from a repository administrator to run. |
| run_workflows_from_fork_pull_requests | Whether workflows triggered by pull requests from forks are allowed to run on private repositories. |
| send_secrets_and_variables | Whether to make secrets and variables available to workflows triggered by pull requests from forks. |
| send_write_tokens_to_workflows | Whether GitHub Actions can create pull requests or submit approving pull request reviews from a workflow triggered by a fork pull request. |
Operations: load.
API path: /repos/{owner}/{repo}/actions/permissions/fork-pr-workflows-private-repos
ActionsGetDefaultWorkflowPermission
| Field | Description |
| --- | --- |
| can_approve_pull_request_reviews | Whether GitHub Actions can approve pull requests. |
| default_workflow_permissions | The default workflow permissions granted to the GITHUB_TOKEN when running workflows. |
Operations: load.
API path: /repos/{owner}/{repo}/actions/permissions/workflow
ActionsHostedRunner
| Field | Description |
| --- | --- |
| enable_static_ip | Whether this runner should be created with a static public IP. |
| id | The unique identifier of the hosted runner. |
| image | The image of runner. |
| image_details | Provides details of a hosted runner image |
| last_active_on | The time at which the runner was last used, in ISO 8601 format. |
| machine_size_details | Provides details of a particular machine spec. |
| maximum_runners | The maximum amount of hosted runners. |
| name | The name of the hosted runner. |
| platform | The operating system of the image. |
| public_ip_enabled | Whether public IP is enabled for the hosted runners. |
| public_ips | The public IP ranges when public IP is enabled for the hosted runners. |
| runner_group_id | The unique identifier of the group that the hosted runner belongs to. |
| size | The machine size of the runner. |
| status | The status of the runner. |
Operations: create, load, update.
API path: /orgs/{org}/actions/hosted-runners
ActionsHostedRunnerLimit
| Field | Description |
| --- | --- |
| current_usage | The current number of static public IP addresses in use by Hosted Runners. |
| maximum | The maximum number of static public IP addresses that can be used for Hosted Runners. |
Operations: load.
API path: /orgs/{org}/actions/hosted-runners/limits
ActionsOrganizationPermission
| Field | Description |
| --- | --- |
| allowed_actions | The permissions policy that controls the actions and reusable workflows that are allowed to run. |
| enabled_repositories | The policy that controls the repositories in the organization that are allowed to run GitHub Actions. |
| selected_actions_url | The API URL to use to get or set the actions and reusable workflows that are allowed to run, when allowed_actions is set to selected. |
| selected_repositories_url | The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when enabled_repositories is set to selected. |
| sha_pinning_required | Whether actions must be pinned to a full-length commit SHA. |
Operations: load.
API path: /orgs/{org}/actions/permissions
ActionsPublicKey
| Field | Description |
| --- | --- |
| created_at | |
| id | |
| key | The Base64 encoded public key. |
| key_id | The identifier for the key. |
| title | |
| url | |
Operations: load.
API path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key
ActionsRepositoryPermission
| Field | Description |
| --- | --- |
| allowed_actions | The permissions policy that controls the actions and reusable workflows that are allowed to run. |
| enabled | Whether GitHub Actions is enabled on the repository. |
| selected_actions_url | The API URL to use to get or set the actions and reusable workflows that are allowed to run, when allowed_actions is set to selected. |
| sha_pinning_required | Whether actions must be pinned to a full-length commit SHA. |
Operations: load.
API path: /repos/{owner}/{repo}/actions/permissions
ActionsSecret
| Field | Description |
| --- | --- |
| created_at | |
| id | |
| name | The name of the secret. |
| updated_at | |
Operations: load.
API path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
ActionsVariable
| Field | Description |
| --- | --- |
| created_at | The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. |
| id | |
| name | The name of the variable. |
| updated_at | The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. |
| value | The value of the variable. |
Operations: load.
API path: /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
ActionsWorkflowAccessToRepository
| Field | Description |
| --- | --- |
| access_level | Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the repository. |
Operations: load.
API path: /repos/{owner}/{repo}/actions/permissions/access
Activity
| Field | Description |
| --- | --- |
| activity_type | The type of the activity that was performed. |
| actor | A GitHub user. |
| after | The SHA of the commit after the activity. |
| archive_url | |
| assignees_url | |
| avatar_url | |
| before | The SHA of the commit before the activity. |
| blobs_url | |
| branches_url | |
| clone_url | |
| collaborators_url | |
| comments_url | |
| commits_url | |
| compare_url | |
| contents_url | |
| contributors_url | |
| deployments_url | |
| description | |
| downloads_url | |
| events_url | |
| followers_url | |
| following_url | |
| fork | |
| forks_url | |
| full_name | |
| gists_url | |
| git_commits_url | |
| git_refs_url | |
| git_tags_url | |
| git_url | |
| github_id | |
| gravatar_id | |
| homepage | |
| hooks_url | |
| html_url | |
| id | |
| issue_comment_url | |
| issue_events_url | |
| issues_url | |
| keys_url | |
| labels_url | |
| language | |
| languages_url | |
| last_read_at | Describes the last point that notifications were checked. |
| login | |
| merges_url | |
| milestones_url | |
| mirror_url | |
| name | |
| node_id | |
| notifications_url | |
| organizations_url | |
| owner | |
| private | |
| pulls_url | |
| read | Whether the notification has been read. |
| received_events_url | |
| ref | The full Git reference, formatted as refs/heads/<branch name>. |
| releases_url | |
| repos_url | |
| site_admin | |
| ssh_url | |
| stargazers_url | |
| starred_url | |
| statuses_url | |
| subscribers_url | |
| subscription_url | |
| subscriptions_url | |
| svn_url | |
| tags_url | |
| teams_url | |
| timestamp | The time when the activity occurred. |
| trees_url | |
| type | |
| url | |
Operations: list, load, patch, remove, update.
API path: /repos/{owner}/{repo}/activity
Add
| Field | Description |
| --- | --- |
| usernames | The GitHub user handles to add to the team. |
Operations: create.
API path: /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add
ApiInsightsRouteStat
| Field | Description |
| --- | --- |
| api_route | The API path's route template |
| http_method | The HTTP method |
| last_rate_limited_timestamp | |
| last_request_timestamp | |
| rate_limited_request_count | The total number of requests that were rate limited within the queried time period |
| total_request_count | The total number of requests within the queried time period |
Operations: list.
API path: /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}
ApiInsightsSubjectStat
| Field | Description |
| --- | --- |
| last_rate_limited_timestamp | |
| last_request_timestamp | |
| rate_limited_request_count | |
| subject_id | |
| subject_name | |
| subject_type | |
| total_request_count | |
Operations: list.
API path: /orgs/{org}/insights/api/subject-stats
ApiInsightsSummaryStat
| Field | Description |
| --- | --- |
| id | |
| rate_limited_request_count | The total number of requests that were rate limited within the queried time period |
| total_request_count | The total number of requests within the queried time period |
Operations: load.
API path: /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}
ApiInsightsTimeStat
| Field | Description |
| --- | --- |
| rate_limited_request_count | |
| timestamp | |
| total_request_count | |
Operations: list, load.
API path: /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}
ApiInsightsUserStat
| Field | Description |
| --- | --- |
| actor_id | |
| actor_name | |
| actor_type | |
| id | |
| integration_id | |
| last_rate_limited_timestamp | |
| last_request_timestamp | |
| oauth_application_id | |
| rate_limited_request_count | |
| total_request_count | |
Operations: load.
API path: /orgs/{org}/insights/api/user-stats/{user_id}
ApiOverview
| Field | Description |
| --- | --- |
| actions | |
| actions_macos | |
| api | |
| codespaces | |
| copilot | |
| dependabot | |
| domains | |
| git | |
| github_enterprise_importer | |
| hooks | |
| importer | |
| packages | |
| pages | |
| ssh_key_fingerprints | |
| ssh_keys | |
| verifiable_password_authentication | |
| web | |
Operations: list.
API path: /meta
App
| Field | Description |
| --- | --- |
| access_tokens_url | |
| account | |
| allow_auto_merge | Whether to allow Auto-merge to be used on pull requests. |
| allow_forking | Whether to allow forking this repo |
| allow_merge_commit | Whether to allow merge commits for pull requests. |
| allow_rebase_merge | Whether to allow rebase merges for pull requests. |
| allow_squash_merge | Whether to allow squash merges for pull requests. |
| allow_update_branch | Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. |
| anonymous_access_enabled | Whether anonymous git access is enabled for this repository |
| app_id | |
| app_slug | |
| archive_url | |
| archived | Whether the repository is archived. |
| assignees_url | |
| blobs_url | |
| branches_url | |
| client_id | |
| client_secret | |
| clone_url | |
| code_search_index_status | The status of the code search index for this repository |
| collaborators_url | |
| comments_url | |
| commits_url | |
| compare_url | |
| contact_email | |
| contents_url | |
| contributors_url | |
| created_at | |
| default_branch | The default branch of the repository. |
| delete_branch_on_merge | Whether to delete head branches when pull requests are merged |
| deployments_url | |
| description | |
| disabled | Returns whether or not this repository disabled. |
| downloads_url | |
| events | |
| events_url | |
| external_url | |
| fork | |
| forks | |
| forks_count | |
| forks_url | |
| full_name | |
| git_commits_url | |
| git_refs_url | |
| git_tags_url | |
| git_url | |
| has_discussions | Whether discussions are enabled. |
| has_downloads | Whether downloads are enabled. |
| has_issues | Whether issues are enabled. |
| has_multiple_single_files | |
| has_pages | |
| has_projects | Whether projects are enabled. |
| has_wiki | Whether the wiki is enabled. |
| homepage | |
| hooks_url | |
| html_url | |
| id | Unique identifier of the repository |
| is_template | Whether this repository acts as a template that can be used to generate new repositories. |
| issue_comment_url | |
| issue_events_url | |
| issues_url | |
| keys_url | |
| labels_url | |
| language | |
| languages_url | |
| license | License Simple |
| master_branch | |
| merge_commit_message | The default value for a merge commit message. |
| merge_commit_title | The default value for a merge commit title. |
| merges_url | |
| milestones_url | |
| mirror_url | |
| name | The name of the repository. |
| node_id | |
| notifications_url | |
| open_issues | |
| open_issues_count | |
| owner | A GitHub user. |
| pem | |
| permissions | The permissions granted to the user access token. |
| private | Whether the repository is private or public. |
| pulls_url | |
| pushed_at |
