Github API PRO
Provides authenticated access to the GitHub REST API.
Prerequisites:
- A Personal Access Token must be configured in
Settings → GitHub - Each script or skill maintains its own permission state per capability
- The first call to a capability may trigger an authorization prompt
- Tokens are securely stored in the iCloud-synced Keychain and are not accessible from JavaScript
Limitations:
- Extension environments (Widget / Keyboard / Notification) cannot present authorization UI
- If permissions have not been granted in the main app, calls in those environments will fail
Permission Model
Permission
Defines the capabilities a script or skill can request:
Permission Status
allowed: granteddenied: rejectedunset: not requested yet
Availability
Availability Type
isAvailable()
Notes:
- Checks whether a token is configured
- Does NOT check permission state
getAvailability()
Permission Management
getPermissionStatus()
requestPermissions()
Notes:
- Requests permissions in batch
- Returns the final set of allowed permissions
Common Types
SortDirection
ArchiveFormat
CommitterIdentity
User & Repository
getViewer()
getRepo()
listRepos()
listUserRepos()
Branches & Commits
listBranches()
listCommits()
compareCommits()
File Contents
getContent()
getTextContent()
getRawContent()
putContent()
Create file:
Update file:
deleteContent()
downloadArchive()
Issues
listIssues()
createIssue()
createIssueComment()
Pull Requests
listPullRequests()
createPullRequest()
GitHub Actions
listWorkflows()
dispatchWorkflow()
Search APIs
searchRepositories()
searchIssues()
searchCode()
Releases
getLatestRelease()
downloadReleaseAsset()
Best Practices
-
Call
requestPermissionsat startup to avoid fragmented prompts -
Use
getPermissionStatusto prevent redundant requests -
Use:
getRawContentgetBlobfor large or binary files
