Skip to content

GitHub: List public events for a user

GitHub activity.activityListPublicEventsForUser: arguments, response, policy and SDK examples.

← Activity operations · Get started

Operation github.activity_list_public_events_for_user

Provider route: GET /users/{username}/events/public. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["activity"]["activityListPublicEventsForUser"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.activity.activityListPublicEventsForUser(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_github import GitHubIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.activity.activity_list_public_events_for_user(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.usernamestringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.per_pageintegerOptionalDefault: 30
query.pageintegerOptionalDefault: 1

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$arrayRoot
$[]ModelEach itemExpand List public events — response body — item

Referenced models: List public events — response body — item

41 more schemas are linked from the tables above, on the schema pages.

List public events — response body — item
FieldTypePresenceDescription and constraints
$objectRootEvent
actorModelRequired within parentExpand List public events — response body — item org
created_atJSONRequired within parent
created_at (anyOf 1)stringAlternativeFormat: date-time
created_at (anyOf 2)nullAlternative
idstringRequired within parent
orgModelOptionalExpand List public events — response body — item org
payloadJSONRequired within parent
payload (anyOf 1)ModelAlternativeExpand List public events — response body — item payload Create Event
payload (anyOf 2)ModelAlternativeExpand List public events — response body — item payload Delete Event
payload (anyOf 3)ModelAlternativeExpand List public events — response body — item payload Discussion Event
payload (anyOf 4)ModelAlternativeExpand List public events — response body — item payload Issues Event
payload (anyOf 5)ModelAlternativeExpand List public events — response body — item payload Issue Comment Event
payload (anyOf 6)ModelAlternativeExpand List public events — response body — item payload Fork Event
payload (anyOf 7)ModelAlternativeExpand List public events — response body — item payload Gollum Event
payload (anyOf 8)ModelAlternativeExpand List public events — response body — item payload Member Event
payload (anyOf 9)ModelAlternativeExpand List public events — response body — item payload Public Event
payload (anyOf 10)ModelAlternativeExpand List public events — response body — item payload Push Event
payload (anyOf 11)ModelAlternativeExpand List public events — response body — item payload Pull Request Event
payload (anyOf 12)ModelAlternativeExpand List public events — response body — item payload Pull Request Review Comment Event
payload (anyOf 13)ModelAlternativeExpand List public events — response body — item payload Pull Request Review Event
payload (anyOf 14)ModelAlternativeExpand List public events — response body — item payload Commit Comment Event
payload (anyOf 15)ModelAlternativeExpand List public events — response body — item payload Release Event
payload (anyOf 16)ModelAlternativeExpand List public events — response body — item payload Watch Event
publicbooleanRequired within parent
repoobjectRequired within parent
repo.idJSONRequired within parent
repo.id (anyOf 1)integerAlternative
repo.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
repo.namestringRequired within parent
repo.urlstringRequired within parentFormat: uri
typeJSONRequired within parent
type (anyOf 1)stringAlternative
type (anyOf 2)nullAlternative

Referenced models: List public events — response body — item org, List public events — response body — item payload Commit Comment Event, List public events — response body — item payload Create Event, List public events — response body — item payload Delete Event, List public events — response body — item payload Discussion Event, List public events — response body — item payload Fork Event, List public events — response body — item payload Gollum Event, List public events — response body — item payload Issue Comment Event, List public events — response body — item payload Issues Event, List public events — response body — item payload Member Event, List public events — response body — item payload Public Event, List public events — response body — item payload Pull Request Event, List public events — response body — item payload Pull Request Review Comment Event, List public events — response body — item payload Pull Request Review Event, List public events — response body — item payload Push Event, List public events — response body — item payload Release Event, List public events — response body — item payload Watch Event

List public events — response body — item org
FieldTypePresenceDescription and constraints
$objectRootActor
avatar_urlstringRequired within parentFormat: uri
display_loginstringOptional
gravatar_idJSONRequired within parent
gravatar_id (anyOf 1)stringAlternative
gravatar_id (anyOf 2)nullAlternative
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
loginstringRequired within parent
urlstringRequired within parentFormat: uri
List public events — response body — item payload Commit Comment Event
FieldTypePresenceDescription and constraints
$objectRoot
actionstringRequired within parent
commentobjectRequired within parent
comment.bodystringOptional
comment.commit_idstringOptional
comment.created_atstringOptionalFormat: date-time
comment.html_urlstringOptionalFormat: uri
comment.idJSONOptional
comment.id (anyOf 1)integerAlternative
comment.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
comment.lineJSONOptional
comment.line (anyOf 1)JSONAlternative
comment.line (anyOf 1) (anyOf 1)integerAlternative
comment.line (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
comment.line (anyOf 2)nullAlternative
comment.node_idstringOptional
comment.pathJSONOptional
comment.path (anyOf 1)stringAlternative
comment.path (anyOf 2)nullAlternative
comment.positionJSONOptional
comment.position (anyOf 1)JSONAlternative
comment.position (anyOf 1) (anyOf 1)integerAlternative
comment.position (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
comment.position (anyOf 2)nullAlternative
comment.reactionsModelOptionalExpand Get an issue — response body — reactions
comment.updated_atstringOptionalFormat: date-time
comment.urlstringOptionalFormat: uri
comment.userModelOptionalExpand Get an issue — response body — user

Referenced models: Get an issue — response body — user, Get an issue — response body — reactions

List public events — response body — item payload Delete Event
FieldTypePresenceDescription and constraints
$objectRoot
full_refstringRequired within parent
pusher_typestringRequired within parent
refstringRequired within parent
ref_typestringRequired within parent

SDK function policy ID: github.activity_list_public_events_for_user. Catalog operation: activity/list-public-events-for-user. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.