GitHub Integration

These endpoints proxy a subset of the GitHub REST API on behalf of the authenticated user, using their linked GitHub identity as the credential. Connect GitHub first via OAuth (see Authentication & OAuth).

All endpoints accept either a session cookie or a Bearer sync token, and require an active linked GitHub identity (link it via the browser OAuth flow first). Errors from the upstream GitHub API are forwarded with their status code and message (mapped to error).

Endpoint table

MethodPathDescription
GET/api/github/reposList repositories accessible to the linked GitHub account (fully paginated across all affiliations). Optional org=<login> restricts to one organization's repos.
GET/api/github/orgsList the organizations the linked GitHub account belongs to.
GET/api/github/issuesList issues from a repository. Query: repo=owner/repo, optional state.
POST/api/github/issuesCreate an issue.
PATCH/api/github/issues/:owner/:repo/:numberUpdate an existing issue's labels and/or assignees.
POST/api/github/issues/:owner/:repo/:number/commentsAdd a comment to an existing issue.
GET/api/github/repos/:owner/:repo/assigneesCandidate assignees for the repository.
GET/api/github/repos/:owner/:repo/labelsDefined labels for the repository.
GET/api/github/repos/:owner/:repo/next-issue-numberCompute max(issue number) + 1 (pull requests excluded).

Listing issues

GET /api/github/issues?repo=owner/repo&state=open

state is open (default), closed, or all. The response is the raw GitHub issue array.

Creating an issue

POST /api/github/issues
Content-Type: application/json

{
  "repo": "owner/repo",
  "title": "Bug report",
  "body": "Details...",
  "labels": ["bug"],
  "assignees": ["octocat"]
}

Returns the upstream GitHub issue object.

Updating an issue

PATCH /api/github/issues/owner/repo/42
Content-Type: application/json

{ "labels": ["bug", "p1"], "assignees": ["octocat"] }

At least one of labels or assignees must be supplied (otherwise 400). Non-string entries are silently filtered. Returns the updated issue.

Adding a comment

POST /api/github/issues/owner/repo/42/comments
Content-Type: application/json

{ "body": "Comment text" }

body must be a non-empty trimmed string. Returns the upstream GitHub comment object.

Organization access

InterlinedList authenticates with a GitHub OAuth App. When an organization has enabled OAuth App access restrictions, that org's private repositories will not appear in /api/github/repos (and GitHub-backed lists for them will fail to sync) until the app is approved for that organization.

Re-running the OAuth flow does not add organizations: because the requested scopes are unchanged, GitHub returns silently without re-prompting. To add an organization to an already-connected account:

  1. On GitHub, go to Settings → Applications → Authorized OAuth Apps and open InterlinedList. (Integrations → GitHub in InterlinedList links straight to this page.)
  2. Under Organization access, click Grant for organizations you own, or Request for organizations where you are a member (an owner then approves the request).
  3. Reload the repo picker. Newly-approved org repositories now appear (use the organization filter, or org=<login>), and the hourly sync picks them up.

Creating a GitHub-backed list for a repository the token cannot reach returns github_repo_inaccessible (403/404) with the same guidance, rather than creating a list that never syncs.

Why these endpoints exist

They power features like GitHub-backed lists and the "create issue from message" affordance in the web app. Most of them are thin proxies: for general-purpose GitHub work, use the GitHub REST API directly with your own token. Use these only when your client is already authenticated against InterlinedList and you want to act as the user's linked GitHub identity without managing a separate token.

  • Authentication & OAuth: link a GitHub identity before calling these endpoints.
  • Lists: create GitHub-backed lists that mirror repository issues.
  • API overview: base URL, authentication at a glance, and response conventions.
  • API explorer: try GitHub integration endpoints live with the interactive Swagger console.