Check if a repository is starred by the authenticated user

octokit.activity.checkRepoIsStarredByAuthenticatedUser({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes

See also: GitHub Developer Guide documentation.

Delete a repository subscription

This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, set the repository's subscription manually.

octokit.activity.deleteRepoSubscription({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes

See also: GitHub Developer Guide documentation.

Delete a thread subscription

Mutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore to true.

octokit.activity.deleteThreadSubscription({
thread_id,
});

Parameters

namerequireddescription
thread_idyes

thread_id parameter

See also: GitHub Developer Guide documentation.

Get feeds

GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:

  • Timeline: The GitHub global public timeline
  • User: The public timeline for any user, using URI template
  • Current user public: The public timeline for the authenticated user
  • Current user: The private timeline for the authenticated user
  • Current user actor: The private timeline for activity created by the authenticated user
  • Current user organizations: The private timeline for the organizations the authenticated user is a member of.
  • Security advisories: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.

Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.

octokit.activity.getFeeds();

Parameters

This endpoint has no parameters

See also: GitHub Developer Guide documentation.

Get a repository subscription

octokit.activity.getRepoSubscription({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes

See also: GitHub Developer Guide documentation.

Get a thread

octokit.activity.getThread({
thread_id,
});

Parameters

namerequireddescription
thread_idyes

thread_id parameter

See also: GitHub Developer Guide documentation.

Get a thread subscription for the authenticated user

This checks to see if the current user is subscribed to a thread. You can also get a repository subscription.

Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were @mentioned, or manually subscribe to a thread.

octokit.activity.getThreadSubscriptionForAuthenticatedUser({
thread_id,
});

Parameters

namerequireddescription
thread_idyes

thread_id parameter

See also: GitHub Developer Guide documentation.

List events for the authenticated user

If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.

octokit.activity.listEventsForAuthenticatedUser({
username,
});

Parameters

namerequireddescription
usernameyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List notifications for the authenticated user

List all notifications for the current user, sorted by most recently updated.

octokit.activity.listNotificationsForAuthenticatedUser();

Parameters

namerequireddescription
allno

If true, show notifications marked as read.

participatingno

If true, only shows notifications in which the user is directly participating or mentioned.

sinceno

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

beforeno

Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List organization events for the authenticated user

This is the user's organization dashboard. You must be authenticated as the user to view this.

octokit.activity.listOrgEventsForAuthenticatedUser({
username,
org,
});

Parameters

namerequireddescription
usernameyes
orgyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List public events

We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.

octokit.activity.listPublicEvents();

Parameters

namerequireddescription
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List public events for a network of repositories

octokit.activity.listPublicEventsForRepoNetwork({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List public events for a user

octokit.activity.listPublicEventsForUser({
username,
});

Parameters

namerequireddescription
usernameyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List public organization events

octokit.activity.listPublicOrgEvents({
org,
});

Parameters

namerequireddescription
orgyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List events received by the authenticated user

These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events.

octokit.activity.listReceivedEventsForUser({
username,
});

Parameters

namerequireddescription
usernameyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List public events received by a user

octokit.activity.listReceivedPublicEventsForUser({
username,
});

Parameters

namerequireddescription
usernameyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List repository events

octokit.activity.listRepoEvents({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List repository notifications for the authenticated user

List all notifications for the current user.

octokit.activity.listRepoNotificationsForAuthenticatedUser({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
allno

If true, show notifications marked as read.

participatingno

If true, only shows notifications in which the user is directly participating or mentioned.

sinceno

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

beforeno

Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List repositories starred by the authenticated user

Lists repositories the authenticated user has starred.

You can also find out when stars were created by passing the following custom media type via the Accept header:

octokit.activity.listReposStarredByAuthenticatedUser();

Parameters

namerequireddescription
sortno

One of created (when the repository was starred) or updated (when it was last pushed to).

directionno

One of asc (ascending) or desc (descending).

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List repositories starred by a user

Lists repositories a user has starred.

You can also find out when stars were created by passing the following custom media type via the Accept header:

octokit.activity.listReposStarredByUser({
username,
});

Parameters

namerequireddescription
usernameyes
sortno

One of created (when the repository was starred) or updated (when it was last pushed to).

directionno

One of asc (ascending) or desc (descending).

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List repositories watched by a user

Lists repositories a user is watching.

octokit.activity.listReposWatchedByUser({
username,
});

Parameters

namerequireddescription
usernameyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List stargazers

Lists the people that have starred the repository.

You can also find out when stars were created by passing the following custom media type via the Accept header:

octokit.activity.listStargazersForRepo({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List repositories watched by the authenticated user

Lists repositories the authenticated user is watching.

octokit.activity.listWatchedReposForAuthenticatedUser();

Parameters

namerequireddescription
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List watchers

Lists the people watching the specified repository.

octokit.activity.listWatchersForRepo({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

Mark notifications as read

Marks all notifications as "read" removes it from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.

octokit.activity.markNotificationsAsRead();

Parameters

namerequireddescription
last_read_atno

Describes the last point that notifications were checked.

readno

Whether the notification has been read.

See also: GitHub Developer Guide documentation.

Mark repository notifications as read

Marks all notifications in a repository as "read" removes them from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.

octokit.activity.markRepoNotificationsAsRead({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
last_read_atno

Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.

See also: GitHub Developer Guide documentation.

Mark a thread as read

octokit.activity.markThreadAsRead({
thread_id,
});

Parameters

namerequireddescription
thread_idyes

thread_id parameter

See also: GitHub Developer Guide documentation.

Set a repository subscription

If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository's subscription completely.

octokit.activity.setRepoSubscription({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
subscribedno

Determines if notifications should be received from this repository.

ignoredno

Determines if all notifications should be blocked from this repository.

See also: GitHub Developer Guide documentation.

Set a thread subscription

If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.

You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.

Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.

octokit.activity.setThreadSubscription({
thread_id,
});

Parameters

namerequireddescription
thread_idyes

thread_id parameter

ignoredno

Whether to block all notifications from a thread.

See also: GitHub Developer Guide documentation.

Star a repository for the authenticated user

Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."

octokit.activity.starRepoForAuthenticatedUser({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes

See also: GitHub Developer Guide documentation.

Unstar a repository for the authenticated user

octokit.activity.unstarRepoForAuthenticatedUser({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes

See also: GitHub Developer Guide documentation.