GitHub

Repository management, issues, and pull requests

Overview

  • Version: 1.1.4
  • Base URL: https://api.github.com
  • Category: Development
  • Tools Available: 547
  • Rate Limit: 5000 requests/hour (authenticated)
  • Documentation: https://docs.github.com/en/rest

Quick Start

from ocp_agent import OCPAgent

agent = OCPAgent()

# Register with authentication
await agent.register_api(
    'github',
    headers={'Authorization': 'Bearer your_token_here'}
)

# List available tools
tools = agent.list_tools('github')
print(f"Available: {len(tools)} tools")

Authentication

Type: Bearer Token

Use ‘Bearer ghp_xxxxxxxxxxxx’ with a GitHub personal access token

See the Authentication Guide for general setup instructions.

Available Tools

This API provides 547 tools across various resource types.

actions

POST actionsAddCustomLabelsToSelfHostedRunnerForRepo POST actionsApproveWorkflowRun POST actionsCancelWorkflowRun PUT actionsCreateOrUpdateRepoSecret POST actionsCreateRegistrationTokenForRepo POST actionsCreateRemoveTokenForRepo POST actionsCreateRepoVariable POST actionsCreateWorkflowDispatch DELETE actionsDeleteActionsCacheById DELETE actionsDeleteActionsCacheByKey DELETE actionsDeleteArtifact DELETE actionsDeleteRepoSecret DELETE actionsDeleteRepoVariable DELETE actionsDeleteSelfHostedRunnerFromRepo DELETE actionsDeleteWorkflowRun DELETE actionsDeleteWorkflowRunLogs PUT actionsDisableWorkflow GET actionsDownloadArtifact GET actionsDownloadJobLogsForWorkflowRun GET actionsDownloadWorkflowRunAttemptLogs GET actionsDownloadWorkflowRunLogs PUT actionsEnableWorkflow POST actionsForceCancelWorkflowRun POST actionsGenerateRunnerJitconfigForRepo GET actionsGetActionsCacheList GET actionsGetActionsCacheRetentionLimitForRepository GET actionsGetActionsCacheStorageLimitForRepository GET actionsGetActionsCacheUsage GET actionsGetAllowedActionsRepository GET actionsGetArtifact GET actionsGetArtifactAndLogRetentionSettingsRepository GET actionsGetCustomOidcSubClaimForRepo GET actionsGetForkPrContributorApprovalPermissionsRepository GET actionsGetGithubActionsDefaultWorkflowPermissionsRepository GET actionsGetGithubActionsPermissionsRepository GET actionsGetJobForWorkflowRun GET actionsGetPendingDeploymentsForRun GET actionsGetPrivateRepoForkPrWorkflowsSettingsRepository GET actionsGetRepoPublicKey GET actionsGetRepoSecret GET actionsGetRepoVariable GET actionsGetReviewsForRun GET actionsGetSelfHostedRunnerForRepo GET actionsGetWorkflow GET actionsGetWorkflowAccessToRepository GET actionsGetWorkflowRun GET actionsGetWorkflowRunAttempt GET actionsGetWorkflowRunUsage GET actionsGetWorkflowUsage GET actionsListArtifactsForRepo GET actionsListJobsForWorkflowRun GET actionsListJobsForWorkflowRunAttempt GET actionsListLabelsForSelfHostedRunnerForRepo GET actionsListRepoOrganizationSecrets GET actionsListRepoOrganizationVariables GET actionsListRepoSecrets GET actionsListRepoVariables GET actionsListRepoWorkflows GET actionsListRunnerApplicationsForRepo GET actionsListSelfHostedRunnersForRepo GET actionsListWorkflowRunArtifacts GET actionsListWorkflowRuns GET actionsListWorkflowRunsForRepo POST actionsReRunJobForWorkflowRun POST actionsReRunWorkflow POST actionsReRunWorkflowFailedJobs DELETE actionsRemoveAllCustomLabelsFromSelfHostedRunnerForRepo DELETE actionsRemoveCustomLabelFromSelfHostedRunnerForRepo POST actionsReviewCustomGatesForRun POST actionsReviewPendingDeploymentsForRun PUT actionsSetActionsCacheRetentionLimitForRepository PUT actionsSetActionsCacheStorageLimitForRepository PUT actionsSetAllowedActionsRepository PUT actionsSetArtifactAndLogRetentionSettingsRepository PUT actionsSetCustomLabelsForSelfHostedRunnerForRepo PUT actionsSetCustomOidcSubClaimForRepo PUT actionsSetForkPrContributorApprovalPermissionsRepository PUT actionsSetGithubActionsDefaultWorkflowPermissionsRepository PUT actionsSetGithubActionsPermissionsRepository PUT actionsSetPrivateRepoForkPrWorkflowsSettingsRepository PUT actionsSetWorkflowAccessToRepository PATCH actionsUpdateRepoVariable

branches

code-scanning

codespaces

commits

dependabot

deployments

environments

gists

git

hooks

issues

pages

pulls

releases

repos

DELETE activityDeleteRepoSubscription GET activityGetRepoSubscription GET activityListRepoEvents GET activityListRepoNotificationsForAuthenticatedUser GET activityListStargazersForRepo GET activityListWatchersForRepo PUT activityMarkRepoNotificationsAsRead PUT activitySetRepoSubscription GET appsGetRepoInstallation POST checksCreate POST checksCreateSuite GET checksGet GET checksGetSuite GET checksListAnnotations GET checksListForSuite POST checksRerequestRun POST checksRerequestSuite PATCH checksSetSuitesPreferences PATCH checksUpdate GET codeSecurityGetConfigurationForRepository POST dependencyGraphCreateRepositorySnapshot GET dependencyGraphDiffRange GET dependencyGraphExportSbom GET interactionsGetRestrictionsForRepo DELETE interactionsRemoveRestrictionsForRepo PUT interactionsSetRestrictionsForRepo GET issuesCheckUserCanBeAssigned POST issuesCreateLabel POST issuesCreateMilestone DELETE issuesDeleteLabel DELETE issuesDeleteMilestone GET issuesGetLabel GET issuesGetMilestone GET issuesListAssignees GET issuesListLabelsForMilestone GET issuesListLabelsForRepo GET issuesListMilestones PATCH issuesUpdateLabel PATCH issuesUpdateMilestone GET licensesGetForRepo DELETE migrationsCancelImport GET migrationsGetCommitAuthors GET migrationsGetImportStatus GET migrationsGetLargeFiles PATCH migrationsMapCommitAuthor PATCH migrationsSetLfsPreference PUT migrationsStartImport PATCH migrationsUpdateImport POST reactionsCreateForCommitComment DELETE reactionsDeleteForCommitComment GET reactionsListForCommitComment PUT reposAddCollaborator GET reposCheckAutomatedSecurityFixes GET reposCheckCollaborator GET reposCheckImmutableReleases GET reposCheckPrivateVulnerabilityReporting GET reposCheckVulnerabilityAlerts GET reposCodeownersErrors GET reposCompareCommits POST reposCreateAttestation POST reposCreateAutolink POST reposCreateCommitStatus POST reposCreateDeployKey POST reposCreateDispatchEvent POST reposCreateFork PUT reposCreateOrUpdateFileContents POST reposCreateTagProtection POST reposCreateUsingTemplate PATCH reposCustomPropertiesForReposCreateOrUpdateRepositoryValues GET reposCustomPropertiesForReposGetRepositoryValues DELETE reposDelete DELETE reposDeleteAutolink DELETE reposDeleteCommitComment DELETE reposDeleteDeployKey DELETE reposDeleteFile DELETE reposDeleteInvitation DELETE reposDeleteTagProtection DELETE reposDisableAutomatedSecurityFixes DELETE reposDisableImmutableReleases DELETE reposDisablePrivateVulnerabilityReporting DELETE reposDisableVulnerabilityAlerts GET reposDownloadTarballArchive GET reposDownloadZipballArchive PUT reposEnableAutomatedSecurityFixes PUT reposEnableImmutableReleases PUT reposEnablePrivateVulnerabilityReporting PUT reposEnableVulnerabilityAlerts GET reposGet GET reposGetAllTopics GET reposGetAutolink GET reposGetBranchRules GET reposGetClones GET reposGetCodeFrequencyStats GET reposGetCollaboratorPermissionLevel GET reposGetCommitActivityStats GET reposGetCommitComment GET reposGetCommunityProfileMetrics GET reposGetContent GET reposGetContributorsStats GET reposGetDeployKey GET reposGetParticipationStats GET reposGetPunchCardStats GET reposGetReadme GET reposGetReadmeInDirectory GET reposGetTopPaths GET reposGetTopReferrers GET reposGetViews GET reposListActivities GET reposListAttestations GET reposListAutolinks GET reposListCollaborators GET reposListCommitCommentsForRepo GET reposListContributors GET reposListDeployKeys GET reposListForks GET reposListInvitations GET reposListLanguages GET reposListTagProtection GET reposListTags GET reposListTeams POST reposMerge POST reposMergeUpstream DELETE reposRemoveCollaborator PUT reposReplaceAllTopics POST reposTransfer PATCH reposUpdate PATCH reposUpdateCommitComment PATCH reposUpdateInvitation

rulesets

search

secret-scanning

security-advisories

users

GET activityListEventsForAuthenticatedUser GET activityListOrgEventsForAuthenticatedUser GET activityListPublicEventsForUser GET activityListReceivedEventsForUser GET activityListReceivedPublicEventsForUser GET activityListReposStarredByUser GET activityListReposWatchedByUser GET appsGetUserInstallation GET billingGetGithubBillingPremiumRequestUsageReportUser GET billingGetGithubBillingUsageReportUser GET billingGetGithubBillingUsageSummaryReportUser GET gistsListForUser GET orgsListForUser DELETE packagesDeletePackageForUser DELETE packagesDeletePackageVersionForUser GET packagesGetAllPackageVersionsForPackageOwnedByUser GET packagesGetPackageForUser GET packagesGetPackageVersionForUser GET packagesListDockerMigrationConflictingPackagesForUser GET packagesListPackagesForUser POST packagesRestorePackageForUser POST packagesRestorePackageVersionForUser POST projectsAddFieldForUser POST projectsAddItemForUser DELETE projectsDeleteItemForUser GET projectsGetFieldForUser GET projectsGetForUser GET projectsGetUserItem GET projectsListFieldsForUser GET projectsListForUser GET projectsListItemsForUser GET projectsListViewItemsForUser PATCH projectsUpdateItemForUser GET reposListForUser GET usersCheckFollowingForUser POST usersDeleteAttestationsBulk DELETE usersDeleteAttestationsById DELETE usersDeleteAttestationsBySubjectDigest GET usersGetByUsername GET usersGetContextForUser GET usersList GET usersListAttestations POST usersListAttestationsBulk GET usersListFollowersForUser GET usersListFollowingForUser GET usersListGpgKeysForUser GET usersListPublicKeysForUser GET usersListSocialAccountsForUser GET usersListSshSigningKeysForUser

Usage Example

from ocp_agent import OCPAgent

# Initialize agent
agent = OCPAgent()

# Register the GitHub
api = await agent.register_api('github')

# List available tools
tools = agent.list_tools('github')
print(f"Available tools: {len(tools)}")

# Use a tool (example)
# result = await agent.call_tool('tool_name', parameters)

Links