Skip to main content

apx-github

GitHub for Action Platform: access to a GitHub organization for the platform's service access, and read-only checks of its repositories. apx- is the prefix every Action Platform extension carries.

action-platform plugin install github
export AP_GITHUB_ORG=my-company AP_GITHUB_TOKEN=…      # or Plugins → GitHub → Configure on the platform
action-platform github branch-protection
action-platform github repo-settings

The access capability runs where the core runs service access: on a hosted platform whose API image carries this plugin, with the options filled under Plugins for the organization. It needs no personal token there: it uses the organization's GitHub connection (Settings → Git, core 0.34 or later). The tools and commands run on the machine that installed it.

What it does

Access

The plugin gives the core's service access the github service: the platform reads who has what in the organization, compares it with the members, roles and teams of the Action Platform organization, and applies the difference. It covers:

Resource Levels
org member, admin — membership and role, pending invitations included
team/<slug> member, maintainer — a team is created when a grant names one that does not exist
repo/<name> pull, triage, push, maintain, admin — direct collaborators; a team's own permission on a repository is read as a grant of the account team:<slug>

Accounts are GitHub logins. A team grant also brings organization membership, and the last organization admin is never removed or demoted. Access is configured only through the plugin's options (org, and optionally token, api_url) and the platform's GitHub connection; the environment is not read for it. See the platform's service access documentation for the operations (access_who, access_audit, access_sync, access_grant, access_revoke, access_offboard).

Tools

Read-only; each is an MCP tool github_<name> and a command action-platform github <name>, answering JSON. Both take an optional repository name; without it they cover every repository of the organization.

Tool Command Answers, per repository
github_branch_protection branch-protection default branch; whether a protection rule or an active ruleset applies to it; the ruleset rule types; required approving reviews; required status checks; whether force pushes are allowed. A repository whose protection GitHub does not return to the token (a private repository on a plan without protection, a token without admin on it) carries the reason in note and null values.
github_repo_settings repo-settings visibility, default branch, archived, delete branch on merge, allow auto-merge, secret scanning, secret scanning push protection, Dependabot alerts, Dependabot security updates. A value the token cannot see is null.

Options

Option Machine Meaning
org AP_GITHUB_ORG the organization login
token AP_GITHUB_TOKEN optional on a hosted platform: when empty, access uses the organization's GitHub connection. A classic personal access token of an organization owner otherwise
api_url AP_GITHUB_API_URL only for GitHub Enterprise Server, e.g. https://github.example.com/api/v3; default https://api.github.com

For the tools on a machine the environment variable wins over the plugin's options file; access reads the options only.

The GitHub connection

On a hosted platform (core 0.34 or later) set only org under Plugins → GitHub → Configure. Access then uses the GitHub account the organization connected under Settings → Git, which must be an owner of the organization. The plugin declares what it needs, so connecting asks GitHub for it:

The connection is It needs Where it is granted
a GitHub App (Create GitHub App on the platform) Organization permission Members: Read and write, repository permission Administration: Read and write, the app installed on the organization an app created after the plugin was installed carries them; for an older one, add them in the app's Permissions & events and accept the new permissions on the organization's installation
an OAuth App scopes admin:org and repo Connect GitHub again: connecting asks for them

When something is missing, the call names it, with the links to grant it — never a request for a token. Reading (access_audit, access_who) needs only the read side (read:org and repo; Members: Read, Administration: Read); a change needs the write side. The token option, when set, wins over the connection.

Token permissions

To Scopes
change access (access_sync, access_grant, access_revoke, access_offboard) admin:org and repo
read access (access_who, access_audit) read:org and repo
github_repo_settings repo; secret scanning and Dependabot settings are null where GitHub does not return them to the token
github_branch_protection repo; where GitHub does not return a repository's protection to the token, the repository carries the reason in note

The plugin talks only to the GitHub API host (api.github.com, or api_url).

Develop

pip install -e ".[dev]"
ruff check . && ruff format --check . && pytest -q

tests/fake.py answers the routes and fields GitHub sends. tests/live/ runs the reads against a real organization and is skipped unless AP_GITHUB_LIVE=1:

AP_GITHUB_LIVE=1 AP_GITHUB_ORG=my-company AP_GITHUB_TOKEN=… pytest tests/live

Reference: writing a plugin.

Metadata

Release files for apx-github 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apx-github 0.2.0
File Size Uploaded Provenance Actions
apx_github-0.2.0.tar.gz 22.0 kB With provenance Details for apx_github-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apx-github 0.2.0
File Interpreter ABI Platform Actions
apx_github-0.2.0-py3-none-any.whl Python 3 none any Details for apx_github-0.2.0-py3-none-any.whl

Total release size: 39.5 kB

Release files / apx_github-0.2.0.tar.gz

Download URL apx_github-0.2.0.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
76cb42112b7e00bb6216de6f4f8e2ba778950481e3b831e135fc8ef28d2f45e7
BLAKE2b-256 checksum
How to use checksums
7f1bf72fb8b34910127180be737adb1f51b808d2f8219b27654ae5b9961ff462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / apx_github-0.2.0-py3-none-any.whl

Download URL apx_github-0.2.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3693244927fd1a33f2ad4fbb25edbb759f775cde75318a202f021dc71478a227
BLAKE2b-256 checksum
How to use checksums
32a19ba73d91397c4f287ad1fa8d93d073bef80802ab4d678578c0aebf1b76ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for apx-github 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for apx_github-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page