# Issue

Schemas

Issues and pull requests with their state, labels, author, assignees, milestone, comment and reaction counts, and for pull requests the branches, merge time and lines changed.

## Endpoints

4 endpoints return issues on GitHub.

- [GETGitHub Issue API`/v1/github/issue`](https://socialtap.dev/docs/reference/github/issue/index.md)
- [GETGitHub Issues API`/v1/github/issues`](https://socialtap.dev/docs/reference/github/issues/index.md)
- [GETGitHub Pull Requests API`/v1/github/profile_pull_requests`](https://socialtap.dev/docs/reference/github/profile-pull-requests/index.md)
- [GETGitHub Issue Search API`/v1/github/search_issues`](https://socialtap.dev/docs/reference/github/search-issues/index.md)

## Schema

Single-item endpoints return this object as `data`; list endpoints return an array of them as `data` with a [`page`](https://socialtap.dev/docs/pagination/index.md) object. The standard [`meta`](https://socialtap.dev/docs/reference/index.md#meta) comes with every response.

| Field | Type | Description |
| --- | --- | --- |
| `platform` | `string` | Platform ID (github, …). |
| `id` | `string` | The item's full reference on its host (owner/repo#123; group/project!34 for a GitLab merge request), as the host writes it to link it from anywhere; the issue endpoint takes it as input. It follows the repository's current name. |
| `url` | `string` (uri) | The item's page (an issue's or a pull request's). |
| `repository` | `object` | The repository it belongs to (id null when the answer names it by path alone). |
| `repository.id` | `string` or `null` | Platform-native repository ID, as Repository.id; null when the platform names the repository without it. |
| `repository.full_name` | `string` | Owner and name as in its link (torvalds/linux). |
| `repository.url` | `string` (uri) | Canonical repository page URL. |
| `number` | `integer` | The item's number in its repository (the 123 of #123). |
| `is_pull_request` | `boolean` | true for a pull request (a merge request on GitLab), false for an issue (a discussion on Hugging Face). |
| `title` | `string` | The item's title. |
| `text` | `string` or `null` | The description as its author wrote it (Markdown source); null when it has none. |
| `state` | `string` | open; closed (closed without merging, or an issue closed); merged (a pull request merged into its base). New values may be added; treat unknown values as closed.<br>One of `open`, `closed`, `merged` |
| `state_reason` | `string` or `null` | Why a closed item was closed: completed (done or fixed), not_planned (won't do, stale, invalid), duplicate (replaced by another item). Null on an open or merged item and where the host does not say. New values may be added; treat unknown values as null.<br>One of `completed`, `not_planned`, `duplicate` |
| `labels` | `string[]` | Label names, in the host's order; \[\] when it has none (listed in unknown_fields when the source cannot see them). |
| `author` | `object` | Who opened it. |
| `author.id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `author.username` | `string` or `null` | Handle without the @; null when the account has none. |
| `author.display_name` | `string` or `null` | Display name shown on the profile. |
| `author.url` | `string` (uri) or `null` | Canonical profile URL. |
| `author.avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `author.is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `assignees` | `object[]` | Accounts it is assigned to; \[\] when none (listed in unknown_fields when the source cannot see them). |
| `assignees[].id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `assignees[].username` | `string` or `null` | Handle without the @; null when the account has none. |
| `assignees[].display_name` | `string` or `null` | Display name shown on the profile. |
| `assignees[].url` | `string` (uri) or `null` | Canonical profile URL. |
| `assignees[].avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `assignees[].is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `milestone` | `object` or `null` | The milestone it is planned for; null when none or not shown. |
| `milestone.title` | `string` | The milestone's title. |
| `milestone.url` | `string` (uri) or `null` | The milestone's page; null when not shown. |
| `milestone.due_at` | `string` (date-time) or `null` | When the milestone is due, RFC 3339 UTC (a due date alone at 00:00:00Z, listed in approximate_fields); null when it has none. |
| `milestone.is_open` | `boolean` or `null` | The milestone is still open (false once closed); null when not shown. |
| `is_draft` | `boolean` or `null` | A pull request marked as a draft (not ready for review); null on an issue or when not shown. |
| `is_locked` | `boolean` or `null` | The conversation is locked: only collaborators can comment. Null when not shown. |
| `published_at` | `string` (date-time) or `null` | When it was opened, RFC 3339 UTC; null when not shown. |
| `updated_at` | `string` (date-time) or `null` | When anything on it last changed (a comment, a label, an edit), RFC 3339 UTC; null when not shown. |
| `closed_at` | `string` (date-time) or `null` | When it was last closed or merged, RFC 3339 UTC; null while open, and when the host does not say. |
| `closed_by` | `object` or `null` | Who last closed it (on a merged pull request, who merged it); null while open or when not shown (lists do not show it). |
| `closed_by.id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `closed_by.username` | `string` or `null` | Handle without the @; null when the account has none. |
| `closed_by.display_name` | `string` or `null` | Display name shown on the profile. |
| `closed_by.url` | `string` (uri) or `null` | Canonical profile URL. |
| `closed_by.avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `closed_by.is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `merged_at` | `string` (date-time) or `null` | When the pull request was merged, RFC 3339 UTC; null on an issue and on a pull request not merged. |
| `merged_by` | `object` or `null` | Who merged the pull request; null on an issue, on a pull request not merged, and when not shown (lists do not show it). |
| `merged_by.id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `merged_by.username` | `string` or `null` | Handle without the @; null when the account has none. |
| `merged_by.display_name` | `string` or `null` | Display name shown on the profile. |
| `merged_by.url` | `string` (uri) or `null` | Canonical profile URL. |
| `merged_by.avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `merged_by.is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `base_branch` | `string` or `null` | The branch the pull request merges into (main); null on an issue or when not shown. |
| `head_branch` | `string` or `null` | The branch the pull request's changes come from; null on an issue, when not shown, and when the branch is gone. |
| `head_repository` | `object` or `null` | The repository head_branch is in: the item's repository itself, or a fork; null on an issue, when not shown, and when the fork is deleted. |
| `head_repository.id` | `string` or `null` | Platform-native repository ID, as Repository.id; null when the platform names the repository without it. |
| `head_repository.full_name` | `string` | Owner and name as in its link (torvalds/linux). |
| `head_repository.url` | `string` (uri) | Canonical repository page URL. |
| `metrics` | `object` | Counts at fetch time; null = not shown, 0 = zero. |
| `metrics.comment_count` | `integer` or `null` | Comments in its conversation (not counting comments on lines of a pull request's code). |
| `metrics.reaction_count` | `integer` or `null` | Emoji reactions to its description, all kinds together; null when not shown. |
| `metrics.like_count` | `integer` or `null` | Thumbs-up reactions (upvotes on GitLab), the ones counted in reaction_count; null when not shown. |
| `metrics.changed_file_count` | `integer` or `null` | Files the pull request changes; null on an issue and when not shown (lists do not show it). |
| `metrics.added_line_count` | `integer` or `null` | Lines the pull request adds; null on an issue and when not shown (lists do not show it). |
| `metrics.deleted_line_count` | `integer` or `null` | Lines the pull request deletes; null on an issue and when not shown (lists do not show it). |
| `platform_specific` | `object` | Fields only this platform has, under its ID (platform_specific.\<platform>); each null when unknown. |
| `platform_specific.github` | `object` or `null` | A GitHub issue's or pull request's own fields. |
| `platform_specific.github.node_id` | `string` or `null` | GitHub's GraphQL node ID (I_kwDO…, PR_kwDO…): the same after the repository is renamed or transferred, unlike id. |
| `platform_specific.github.author_association` | `string` or `null` | The author's relation to the repository: owner, member (of its organization), collaborator, contributor (has a merged commit), first_time_contributor, first_timer (first contribution on GitHub), mannequin (an imported placeholder) or none. New values may be added.<br>One of `owner`, `member`, `collaborator`, `contributor`, `first_time_contributor`, `first_timer`, `mannequin`, `none` |
| `platform_specific.github.issue_type` | `string` or `null` | The issue type its organization assigned (Bug, Feature, Task); null when none, and on a pull request. |
| `platform_specific.github.lock_reason` | `string` or `null` | Why the conversation was locked; null when it is not locked or no reason was given. New values may be added.<br>One of `resolved`, `off_topic`, `too_heated`, `spam` |
| `platform_specific.github.reactions` | `object` | Reactions to the description by emoji; each null when not shown. |
| `platform_specific.github.reactions.thumbs_up_count` | `integer` or `null` | 👍 (+1) reactions; metrics.like_count. |
| `platform_specific.github.reactions.thumbs_down_count` | `integer` or `null` | 👎 (-1) reactions. |
| `platform_specific.github.reactions.laugh_count` | `integer` or `null` | 😄 reactions. |
| `platform_specific.github.reactions.hooray_count` | `integer` or `null` | 🎉 reactions. |
| `platform_specific.github.reactions.confused_count` | `integer` or `null` | 😕 reactions. |
| `platform_specific.github.reactions.heart_count` | `integer` or `null` | ❤️ reactions. |
| `platform_specific.github.reactions.rocket_count` | `integer` or `null` | 🚀 reactions. |
| `platform_specific.github.reactions.eyes_count` | `integer` or `null` | 👀 reactions. |
| `platform_specific.github.sub_issue_count` | `integer` or `null` | Sub-issues it has; null when not shown and on a pull request. |
| `platform_specific.github.completed_sub_issue_count` | `integer` or `null` | Of sub_issue_count, those closed as completed; null when not shown and on a pull request. |
| `platform_specific.github.parent_issue_id` | `string` or `null` | On a sub-issue, the id of the issue it belongs to (owner/repo#123), which the issue endpoint takes as input; null when it has none, and on a pull request. |
| `platform_specific.github.review_comment_count` | `integer` or `null` | Review comments on lines of the pull request's code; null on an issue and when not shown (lists do not show it). |
| `platform_specific.github.commit_count` | `integer` or `null` | Commits in the pull request; null on an issue and when not shown (lists do not show it). |
| `approximate_fields` | `string[]` | JSON paths of values rounded by the platform or parsed from display text. \[\] when all exact. |
| `unknown_fields` | `string[]` | JSON paths of lists whose \[\] means unknown rather than none (a source that cannot see them); null already means unknown for every other field. \[\] when every list is known. |

## Item errors

Besides the [request-level errors](https://socialtap.dev/docs/errors/index.md) every endpoint can return, issue endpoints return:

| Code | HTTP | Retry | Meaning | What to do |
| --- | --- | --- | --- | --- |
| `not_found` | 404 | No | The item does not exist or was deleted. On GET /v1/requests/{id}/response: the response was not kept (details.reason says why). | Check the link or ID. Do not retry. |

---

[HTML version](https://socialtap.dev/resources/issue/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
