release_comments
Creates, updates, deletes, gets or lists a release_comments resource.
Overview
| Name | release_comments |
| Type | Resource |
| Id | github.reactions.release_comments |
Fields
The following fields are returned by SELECT queries:
- list_for_release
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
node_id | string | (example: MDg6UmVhY3Rpb24x) |
content | string | The reaction to use (+1, -1, laugh, confused, heart, hooray, rocket, eyes) (example: heart) |
created_at | string (date-time) | (example: 2016-05-20T20:09:31Z) |
user | object | A GitHub user. (title: Simple User) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_for_release | select | owner, repo, release_id | content, per_page, page | List the reactions to a release. |
create_for_release | insert | owner, repo, release_id, content | Create a reaction to a release. A response with a Status: 200 OK means that you already added the reaction type to this release. | |
delete_for_release | delete | owner, repo, release_id, reaction_id | > [!NOTE] > You can also specify a repository by repository_id using the route DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id.Delete a reaction to a release. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
reaction_id | integer | The unique identifier of the reaction. |
release_id | integer | The unique identifier of the release. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
content | string | Returns a single reaction type. Omit this parameter to list all reactions to a release. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_for_release
List the reactions to a release.
SELECT
id,
node_id,
content,
created_at,
user
FROM github.reactions.release_comments
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND release_id = '{{ release_id }}' -- required
AND content = '{{ content }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- create_for_release
- Manifest
Create a reaction to a release. A response with a Status: 200 OK means that you already added the reaction type to this release.
INSERT INTO github.reactions.release_comments (
content,
owner,
repo,
release_id
)
SELECT
'{{ content }}' /* required */,
'{{ owner }}',
'{{ repo }}',
'{{ release_id }}'
RETURNING
id,
node_id,
content,
created_at,
user
;
# Description fields are for documentation purposes
- name: release_comments
props:
- name: owner
value: "{{ owner }}"
description: Required parameter for the release_comments resource.
- name: repo
value: "{{ repo }}"
description: Required parameter for the release_comments resource.
- name: release_id
value: {{ release_id }}
description: Required parameter for the release_comments resource.
- name: content
value: "{{ content }}"
description: |
The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release.
valid_values: ['+1', 'laugh', 'heart', 'hooray', 'rocket', 'eyes']
DELETE examples
- delete_for_release
> [!NOTE]
> You can also specify a repository by repository_id using the route DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id.
Delete a reaction to a release.
DELETE FROM github.reactions.release_comments
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND release_id = '{{ release_id }}' --required
AND reaction_id = '{{ reaction_id }}' --required
;