Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
octokit.issues.addAssignees({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
assignees | no | Usernames of people to assign this issue to. NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise. |
See also: GitHub Developer Guide documentation.
octokit.issues.addLabels({owner,repo,issue_number,labels,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
labels | yes | The name of the label to add to the issue. Must contain at least one label. Note: Alternatively, you can pass a single label as a |
See also: GitHub Developer Guide documentation.
Checks if a user has permission to be assigned to an issue in this repository.
If the assignee
can be assigned to issues in the repository, a 204
header with no content is returned.
Otherwise a 404
status code is returned.
octokit.issues.checkUserCanBeAssigned({owner,repo,assignee,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
assignee | yes |
See also: GitHub Developer Guide documentation.
Any user with pull access to a repository can create an issue. If issues are disabled in the repository, the API returns a 410 Gone
status.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
octokit.issues.create({owner,repo,title,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
title | yes | The title of the issue. |
body | no | The contents of the issue. |
assignee | no | Login for the user that this issue should be assigned to. NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. This field is deprecated. |
milestone | no | |
labels | no | Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise. |
assignees | no | Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise. |
See also: GitHub Developer Guide documentation.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" and "Dealing with abuse rate limits" for details.
octokit.issues.createComment({owner,repo,issue_number,body,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
body | yes | The contents of the comment. |
See also: GitHub Developer Guide documentation.
octokit.issues.createLabel({owner,repo,name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
name | yes | The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing |
color | no | The hexadecimal color code for the label, without the leading |
description | no | A short description of the label. |
See also: GitHub Developer Guide documentation.
octokit.issues.createMilestone({owner,repo,title,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
title | yes | The title of the milestone. |
state | no | The state of the milestone. Either |
description | no | A description of the milestone. |
due_on | no | The milestone due date. This is a timestamp in ISO 8601 format: |
See also: GitHub Developer Guide documentation.
octokit.issues.deleteComment({owner,repo,comment_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
comment_id | yes | comment_id parameter |
See also: GitHub Developer Guide documentation.
octokit.issues.deleteLabel({owner,repo,name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
name | yes |
See also: GitHub Developer Guide documentation.
octokit.issues.deleteMilestone({owner,repo,milestone_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
milestone_number | yes | milestone_number parameter |
See also: GitHub Developer Guide documentation.
The API returns a 301 Moved Permanently
status if the issue wastransferred to another repository. If the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API returns a 404 Not Found
status. If the issue was deleted from a repository where the authenticated user has read access, the API returns a 410 Gone
status. To receive webhook events for transferred and deleted issues, subscribe to the issues
webhook.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
octokit.issues.get({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
See also: GitHub Developer Guide documentation.
octokit.issues.getComment({owner,repo,comment_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
comment_id | yes | comment_id parameter |
See also: GitHub Developer Guide documentation.
octokit.issues.getEvent({owner,repo,event_id,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
event_id | yes |
See also: GitHub Developer Guide documentation.
octokit.issues.getLabel({owner,repo,name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
name | yes |
See also: GitHub Developer Guide documentation.
octokit.issues.getMilestone({owner,repo,milestone_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
milestone_number | yes | milestone_number parameter |
See also: GitHub Developer Guide documentation.
List issues assigned to the authenticated user across all visible repositories including owned repositories, member repositories, and organization repositories. You can use the filter
query parameter to fetch issues that are not necessarily assigned to you.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
octokit.issues.list();
name | required | description |
---|---|---|
filter | no | Indicates which sorts of issues to return. Can be one of: |
state | no | Indicates the state of the issues to return. Can be either |
labels | no | A list of comma separated label names. Example: |
sort | no | What to sort results by. Can be either |
direction | no | One of |
since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
collab | no | |
orgs | no | |
owned | no | |
pulls | no | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the available assignees for issues in a repository.
octokit.issues.listAssignees({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Issue Comments are ordered by ascending ID.
octokit.issues.listComments({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
By default, Issue Comments are ordered by ascending ID.
octokit.issues.listCommentsForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
sort | no | One of |
direction | no | Either |
since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.issues.listEvents({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.issues.listEventsForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.issues.listEventsForTimeline({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
List issues across owned and member repositories assigned to the authenticated user.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
octokit.issues.listForAuthenticatedUser();
name | required | description |
---|---|---|
filter | no | Indicates which sorts of issues to return. Can be one of: |
state | no | Indicates the state of the issues to return. Can be either |
labels | no | A list of comma separated label names. Example: |
sort | no | What to sort results by. Can be either |
direction | no | One of |
since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
List issues in an organization assigned to the authenticated user.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
octokit.issues.listForOrg({org,});
name | required | description |
---|---|---|
org | yes | |
filter | no | Indicates which sorts of issues to return. Can be one of: |
state | no | Indicates the state of the issues to return. Can be either |
labels | no | A list of comma separated label names. Example: |
sort | no | What to sort results by. Can be either |
direction | no | One of |
since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
List issues in a repository.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request
key. Be aware that the id
of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
octokit.issues.listForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
milestone | no | If an |
state | no | Indicates the state of the issues to return. Can be either |
assignee | no | Can be the name of a user. Pass in |
creator | no | The user that created the issue. |
mentioned | no | A user that's mentioned in the issue. |
labels | no | A list of comma separated label names. Example: |
sort | no | What to sort results by. Can be either |
direction | no | One of |
since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.issues.listLabelsForMilestone({owner,repo,milestone_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
milestone_number | yes | milestone_number parameter |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.issues.listLabelsForRepo({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.issues.listLabelsOnIssue({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.issues.listMilestones({owner,repo,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
state | no | The state of the milestone. Either |
sort | no | What to sort results by. Either |
direction | no | The direction of the sort. Either |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Users with push access can lock an issue or pull request's conversation.
Note that, if you choose not to pass any parameters, you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
octokit.issues.lock({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
lock_reason | no | The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: |
See also: GitHub Developer Guide documentation.
octokit.issues.removeAllLabels({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
See also: GitHub Developer Guide documentation.
Removes one or more assignees from an issue.
octokit.issues.removeAssignees({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
assignees | no | Usernames of assignees to remove from an issue. NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise. |
See also: GitHub Developer Guide documentation.
Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a 404 Not Found
status if the label does not exist.
octokit.issues.removeLabel({owner,repo,issue_number,name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
name | yes |
See also: GitHub Developer Guide documentation.
Removes any previous labels and sets the new labels for an issue.
octokit.issues.setLabels({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
labels | no | The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a |
See also: GitHub Developer Guide documentation.
Users with push access can unlock an issue's conversation.
octokit.issues.unlock({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
See also: GitHub Developer Guide documentation.
Issue owners and users with push access can edit an issue.
octokit.issues.update({owner,repo,issue_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
issue_number | yes | issue_number parameter |
title | no | The title of the issue. |
body | no | The contents of the issue. |
assignee | no | Login for the user that this issue should be assigned to. This field is deprecated. |
state | no | State of the issue. Either |
milestone | no | |
labels | no | Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ( |
assignees | no | Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ( |
See also: GitHub Developer Guide documentation.
octokit.issues.updateComment({owner,repo,comment_id,body,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
comment_id | yes | comment_id parameter |
body | yes | The contents of the comment. |
See also: GitHub Developer Guide documentation.
octokit.issues.updateLabel({owner,repo,name,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
name | yes | |
new_name | no | The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing |
color | no | The hexadecimal color code for the label, without the leading |
description | no | A short description of the label. |
See also: GitHub Developer Guide documentation.
octokit.issues.updateMilestone({owner,repo,milestone_number,});
name | required | description |
---|---|---|
owner | yes | |
repo | yes | |
milestone_number | yes | milestone_number parameter |
title | no | The title of the milestone. |
state | no | The state of the milestone. Either |
description | no | A description of the milestone. |
due_on | no | The milestone due date. This is a timestamp in ISO 8601 format: |
See also: GitHub Developer Guide documentation.