pub struct Issues {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl Issues
impl Issues
sourcepub async fn list(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
collab: bool,
orgs: bool,
owned: bool,
pulls: bool,
per_page: i64,
page: i64
) -> Result<Vec<Issue>>
pub async fn list(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
collab: bool,
orgs: bool,
owned: bool,
pulls: bool,
per_page: i64,
page: i64
) -> Result<Vec<Issue>>
List issues assigned to the authenticated user.
This function performs a GET
to the /issues
endpoint.
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.
FROM: https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user
Parameters:
filter: crate::types::Filter
– Indicates which sorts of issues to return. Can be one of:
\*assigned
: Issues assigned to you
\*created
: Issues created by you
\*mentioned
: Issues mentioning you
\*subscribed
: Issues you’re subscribed to updates for
\*all
orrepos
: All issues the authenticated user can see, regardless of participation or creation.state: crate::types::IssuesListState
– Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
.labels: &str
– A list of comma separated label names. Example:bug,ui,@high
.sort: crate::types::IssuesListSort
– What to sort results by. Can be eithercreated
,updated
,comments
.direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.collab: bool
orgs: bool
owned: bool
pulls: bool
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
collab: bool,
orgs: bool,
owned: bool,
pulls: bool
) -> Result<Vec<Issue>>
pub async fn list_all(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
collab: bool,
orgs: bool,
owned: bool,
pulls: bool
) -> Result<Vec<Issue>>
List issues assigned to the authenticated user.
This function performs a GET
to the /issues
endpoint.
As opposed to list
, this function returns all the pages of the request at once.
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.
FROM: https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user
sourcepub async fn list_for_org(
&self,
org: &str,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<Issue>>
pub async fn list_for_org(
&self,
org: &str,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<Issue>>
List organization issues assigned to the authenticated user.
This function performs a GET
to the /orgs/{org}/issues
endpoint.
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.
Parameters:
org: &str
filter: crate::types::Filter
– Indicates which sorts of issues to return. Can be one of:
\*assigned
: Issues assigned to you
\*created
: Issues created by you
\*mentioned
: Issues mentioning you
\*subscribed
: Issues you’re subscribed to updates for
\*all
orrepos
: All issues the authenticated user can see, regardless of participation or creation.state: crate::types::IssuesListState
– Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
.labels: &str
– A list of comma separated label names. Example:bug,ui,@high
.sort: crate::types::IssuesListSort
– What to sort results by. Can be eithercreated
,updated
,comments
.direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_for_org(
&self,
org: &str,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<Issue>>
pub async fn list_all_for_org(
&self,
org: &str,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<Issue>>
List organization issues assigned to the authenticated user.
This function performs a GET
to the /orgs/{org}/issues
endpoint.
As opposed to list_for_org
, this function returns all the pages of the request at once.
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.
sourcepub async fn list_assignees(
&self,
owner: &str,
repo: &str,
per_page: i64,
page: i64
) -> Result<Vec<SimpleUser>>
pub async fn list_assignees(
&self,
owner: &str,
repo: &str,
per_page: i64,
page: i64
) -> Result<Vec<SimpleUser>>
List assignees.
This function performs a GET
to the /repos/{owner}/{repo}/assignees
endpoint.
Lists the available assignees for issues in a repository.
FROM: https://docs.github.com/rest/reference/issues#list-assignees
Parameters:
owner: &str
repo: &str
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_assignees(
&self,
owner: &str,
repo: &str
) -> Result<Vec<SimpleUser>>
pub async fn list_all_assignees(
&self,
owner: &str,
repo: &str
) -> Result<Vec<SimpleUser>>
List assignees.
This function performs a GET
to the /repos/{owner}/{repo}/assignees
endpoint.
As opposed to list_assignees
, this function returns all the pages of the request at once.
Lists the available assignees for issues in a repository.
FROM: https://docs.github.com/rest/reference/issues#list-assignees
sourcepub async fn check_user_can_be_assigned(
&self,
owner: &str,
repo: &str,
assignee: &str
) -> Result<()>
pub async fn check_user_can_be_assigned(
&self,
owner: &str,
repo: &str,
assignee: &str
) -> Result<()>
Check if a user can be assigned.
This function performs a GET
to the /repos/{owner}/{repo}/assignees/{assignee}
endpoint.
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.
FROM: https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned
Parameters:
owner: &str
repo: &str
assignee: &str
sourcepub async fn list_for_repo(
&self,
owner: &str,
repo: &str,
milestone: &str,
state: IssuesListState,
assignee: &str,
creator: &str,
mentioned: &str,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<IssueSimple>>
pub async fn list_for_repo(
&self,
owner: &str,
repo: &str,
milestone: &str,
state: IssuesListState,
assignee: &str,
creator: &str,
mentioned: &str,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<IssueSimple>>
List repository issues.
This function performs a GET
to the /repos/{owner}/{repo}/issues
endpoint.
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.
FROM: https://docs.github.com/rest/reference/issues#list-repository-issues
Parameters:
owner: &str
repo: &str
milestone: &str
– If aninteger
is passed, it should refer to a milestone by itsnumber
field. If the string*
is passed, issues with any milestone are accepted. If the stringnone
is passed, issues without milestones are returned.state: crate::types::IssuesListState
– Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
.assignee: &str
– Can be the name of a user. Pass innone
for issues with no assigned user, and*
for issues assigned to any user.creator: &str
– The user that created the issue.mentioned: &str
– A user that’s mentioned in the issue.labels: &str
– A list of comma separated label names. Example:bug,ui,@high
.sort: crate::types::IssuesListSort
– What to sort results by. Can be eithercreated
,updated
,comments
.direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_for_repo(
&self,
owner: &str,
repo: &str,
milestone: &str,
state: IssuesListState,
assignee: &str,
creator: &str,
mentioned: &str,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<IssueSimple>>
pub async fn list_all_for_repo(
&self,
owner: &str,
repo: &str,
milestone: &str,
state: IssuesListState,
assignee: &str,
creator: &str,
mentioned: &str,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<IssueSimple>>
List repository issues.
This function performs a GET
to the /repos/{owner}/{repo}/issues
endpoint.
As opposed to list_for_repo
, this function returns all the pages of the request at once.
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.
FROM: https://docs.github.com/rest/reference/issues#list-repository-issues
sourcepub async fn create(
&self,
owner: &str,
repo: &str,
body: &IssuesCreateRequest
) -> Result<Issue>
pub async fn create(
&self,
owner: &str,
repo: &str,
body: &IssuesCreateRequest
) -> Result<Issue>
Create an issue.
This function performs a POST
to the /repos/{owner}/{repo}/issues
endpoint.
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 secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
FROM: https://docs.github.com/rest/reference/issues#create-an-issue
Parameters:
owner: &str
repo: &str
sourcepub async fn list_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: Sort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<IssueComment>>
pub async fn list_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: Sort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<IssueComment>>
List issue comments for a repository.
This function performs a GET
to the /repos/{owner}/{repo}/issues/comments
endpoint.
By default, Issue Comments are ordered by ascending ID.
FROM: https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository
Parameters:
owner: &str
repo: &str
sort: crate::types::Sort
– One ofcreated
(when the repository was starred) orupdated
(when it was last pushed to).direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: Sort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<IssueComment>>
pub async fn list_all_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: Sort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<IssueComment>>
List issue comments for a repository.
This function performs a GET
to the /repos/{owner}/{repo}/issues/comments
endpoint.
As opposed to list_comments_for_repo
, this function returns all the pages of the request at once.
By default, Issue Comments are ordered by ascending ID.
FROM: https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository
sourcepub async fn get_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64
) -> Result<IssueComment>
pub async fn get_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64
) -> Result<IssueComment>
Get an issue comment.
This function performs a GET
to the /repos/{owner}/{repo}/issues/comments/{comment_id}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#get-an-issue-comment
Parameters:
owner: &str
repo: &str
comment_id: i64
– comment_id parameter.
sourcepub async fn delete_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64
) -> Result<()>
pub async fn delete_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64
) -> Result<()>
Delete an issue comment.
This function performs a DELETE
to the /repos/{owner}/{repo}/issues/comments/{comment_id}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#delete-an-issue-comment
Parameters:
owner: &str
repo: &str
comment_id: i64
– comment_id parameter.
sourcepub async fn update_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<IssueComment>
pub async fn update_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<IssueComment>
Update an issue comment.
This function performs a PATCH
to the /repos/{owner}/{repo}/issues/comments/{comment_id}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#update-an-issue-comment
Parameters:
owner: &str
repo: &str
comment_id: i64
– comment_id parameter.
sourcepub async fn list_events_for_repo(
&self,
owner: &str,
repo: &str,
per_page: i64,
page: i64
) -> Result<Vec<IssueEvent>>
pub async fn list_events_for_repo(
&self,
owner: &str,
repo: &str,
per_page: i64,
page: i64
) -> Result<Vec<IssueEvent>>
List issue events for a repository.
This function performs a GET
to the /repos/{owner}/{repo}/issues/events
endpoint.
FROM: https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository
Parameters:
owner: &str
repo: &str
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_events_for_repo(
&self,
owner: &str,
repo: &str
) -> Result<Vec<IssueEvent>>
pub async fn list_all_events_for_repo(
&self,
owner: &str,
repo: &str
) -> Result<Vec<IssueEvent>>
List issue events for a repository.
This function performs a GET
to the /repos/{owner}/{repo}/issues/events
endpoint.
As opposed to list_events_for_repo
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository
sourcepub async fn get_event(
&self,
owner: &str,
repo: &str,
event_id: i64
) -> Result<IssueEvent>
pub async fn get_event(
&self,
owner: &str,
repo: &str,
event_id: i64
) -> Result<IssueEvent>
Get an issue event.
This function performs a GET
to the /repos/{owner}/{repo}/issues/events/{event_id}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#get-an-issue-event
Parameters:
owner: &str
repo: &str
event_id: i64
sourcepub async fn get(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Issue>
pub async fn get(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Issue>
Get an issue.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}
endpoint.
The API returns a 301 Moved Permanently
status if the issue was
transferred 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.
FROM: https://docs.github.com/rest/reference/issues#get-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn update(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesUpdateRequest
) -> Result<Issue>
pub async fn update(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesUpdateRequest
) -> Result<Issue>
Update an issue.
This function performs a PATCH
to the /repos/{owner}/{repo}/issues/{issue_number}
endpoint.
Issue owners and users with push access can edit an issue.
FROM: https://docs.github.com/rest/reference/issues/#update-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn add_assignees(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesAddAssigneesRequest
) -> Result<IssueSimple>
pub async fn add_assignees(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesAddAssigneesRequest
) -> Result<IssueSimple>
Add assignees to an issue.
This function performs a POST
to the /repos/{owner}/{repo}/issues/{issue_number}/assignees
endpoint.
Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
FROM: https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn remove_assignees(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesAddAssigneesRequest
) -> Result<IssueSimple>
pub async fn remove_assignees(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesAddAssigneesRequest
) -> Result<IssueSimple>
Remove assignees from an issue.
This function performs a DELETE
to the /repos/{owner}/{repo}/issues/{issue_number}/assignees
endpoint.
Removes one or more assignees from an issue.
FROM: https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn list_comments(
&self,
owner: &str,
repo: &str,
issue_number: i64,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<IssueComment>>
pub async fn list_comments(
&self,
owner: &str,
repo: &str,
issue_number: i64,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<IssueComment>>
List issue comments.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/comments
endpoint.
Issue Comments are ordered by ascending ID.
FROM: https://docs.github.com/rest/reference/issues#list-issue-comments
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_comments(
&self,
owner: &str,
repo: &str,
issue_number: i64,
since: Option<DateTime<Utc>>
) -> Result<Vec<IssueComment>>
pub async fn list_all_comments(
&self,
owner: &str,
repo: &str,
issue_number: i64,
since: Option<DateTime<Utc>>
) -> Result<Vec<IssueComment>>
List issue comments.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/comments
endpoint.
As opposed to list_comments
, this function returns all the pages of the request at once.
Issue Comments are ordered by ascending ID.
FROM: https://docs.github.com/rest/reference/issues#list-issue-comments
sourcepub async fn create_comment(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &PullsUpdateReviewRequest
) -> Result<IssueComment>
pub async fn create_comment(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &PullsUpdateReviewRequest
) -> Result<IssueComment>
Create an issue comment.
This function performs a POST
to the /repos/{owner}/{repo}/issues/{issue_number}/comments
endpoint.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
FROM: https://docs.github.com/rest/reference/issues#create-an-issue-comment
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn list_events(
&self,
owner: &str,
repo: &str,
issue_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<IssueEventAnyOf>>
pub async fn list_events(
&self,
owner: &str,
repo: &str,
issue_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<IssueEventAnyOf>>
List issue events.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/events
endpoint.
FROM: https://docs.github.com/rest/reference/issues#list-issue-events
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_events(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Vec<IssueEventAnyOf>>
pub async fn list_all_events(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Vec<IssueEventAnyOf>>
List issue events.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/events
endpoint.
As opposed to list_events
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/issues#list-issue-events
sourcepub async fn list_labels_on_issue(
&self,
owner: &str,
repo: &str,
issue_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<Label>>
pub async fn list_labels_on_issue(
&self,
owner: &str,
repo: &str,
issue_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<Label>>
List labels for an issue.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/labels
endpoint.
FROM: https://docs.github.com/rest/reference/issues#list-labels-for-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_labels_on_issue(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Vec<Label>>
pub async fn list_all_labels_on_issue(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Vec<Label>>
List labels for an issue.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/labels
endpoint.
As opposed to list_labels_on_issue
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/issues#list-labels-for-an-issue
sourcepub async fn set_labels(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesSetLabelsRequestAnyOf
) -> Result<Vec<Label>>
pub async fn set_labels(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesSetLabelsRequestAnyOf
) -> Result<Vec<Label>>
Set labels for an issue.
This function performs a PUT
to the /repos/{owner}/{repo}/issues/{issue_number}/labels
endpoint.
Removes any previous labels and sets the new labels for an issue.
FROM: https://docs.github.com/rest/reference/issues#set-labels-for-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn add_labels(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesAddLabelsRequestOneOf
) -> Result<Vec<Label>>
pub async fn add_labels(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesAddLabelsRequestOneOf
) -> Result<Vec<Label>>
Add labels to an issue.
This function performs a POST
to the /repos/{owner}/{repo}/issues/{issue_number}/labels
endpoint.
FROM: https://docs.github.com/rest/reference/issues#add-labels-to-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn remove_all_labels(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<()>
pub async fn remove_all_labels(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<()>
Remove all labels from an issue.
This function performs a DELETE
to the /repos/{owner}/{repo}/issues/{issue_number}/labels
endpoint.
FROM: https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn remove_label(
&self,
owner: &str,
repo: &str,
issue_number: i64,
name: &str
) -> Result<Vec<Label>>
pub async fn remove_label(
&self,
owner: &str,
repo: &str,
issue_number: i64,
name: &str
) -> Result<Vec<Label>>
Remove a label from an issue.
This function performs a DELETE
to the /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}
endpoint.
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.
FROM: https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.name: &str
sourcepub async fn lock(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesLockRequest
) -> Result<()>
pub async fn lock(
&self,
owner: &str,
repo: &str,
issue_number: i64,
body: &IssuesLockRequest
) -> Result<()>
Lock an issue.
This function performs a PUT
to the /repos/{owner}/{repo}/issues/{issue_number}/lock
endpoint.
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.”
FROM: https://docs.github.com/rest/reference/issues#lock-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn unlock(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<()>
pub async fn unlock(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<()>
Unlock an issue.
This function performs a DELETE
to the /repos/{owner}/{repo}/issues/{issue_number}/lock
endpoint.
Users with push access can unlock an issue’s conversation.
FROM: https://docs.github.com/rest/reference/issues#unlock-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.
sourcepub async fn list_events_for_timeline(
&self,
owner: &str,
repo: &str,
issue_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<Data>>
pub async fn list_events_for_timeline(
&self,
owner: &str,
repo: &str,
issue_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<Data>>
List timeline events for an issue.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/timeline
endpoint.
FROM: https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue
Parameters:
owner: &str
repo: &str
issue_number: i64
– issue_number parameter.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_events_for_timeline(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Vec<Data>>
pub async fn list_all_events_for_timeline(
&self,
owner: &str,
repo: &str,
issue_number: i64
) -> Result<Vec<Data>>
List timeline events for an issue.
This function performs a GET
to the /repos/{owner}/{repo}/issues/{issue_number}/timeline
endpoint.
As opposed to list_events_for_timeline
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue
sourcepub async fn list_labels_for_repo(
&self,
owner: &str,
repo: &str,
per_page: i64,
page: i64
) -> Result<Vec<Label>>
pub async fn list_labels_for_repo(
&self,
owner: &str,
repo: &str,
per_page: i64,
page: i64
) -> Result<Vec<Label>>
List labels for a repository.
This function performs a GET
to the /repos/{owner}/{repo}/labels
endpoint.
FROM: https://docs.github.com/rest/reference/issues#list-labels-for-a-repository
Parameters:
owner: &str
repo: &str
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_labels_for_repo(
&self,
owner: &str,
repo: &str
) -> Result<Vec<Label>>
pub async fn list_all_labels_for_repo(
&self,
owner: &str,
repo: &str
) -> Result<Vec<Label>>
List labels for a repository.
This function performs a GET
to the /repos/{owner}/{repo}/labels
endpoint.
As opposed to list_labels_for_repo
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/issues#list-labels-for-a-repository
sourcepub async fn create_label(
&self,
owner: &str,
repo: &str,
body: &IssuesCreateLabelRequest
) -> Result<Label>
pub async fn create_label(
&self,
owner: &str,
repo: &str,
body: &IssuesCreateLabelRequest
) -> Result<Label>
Create a label.
This function performs a POST
to the /repos/{owner}/{repo}/labels
endpoint.
FROM: https://docs.github.com/rest/reference/issues#create-a-label
Parameters:
owner: &str
repo: &str
sourcepub async fn get_label(
&self,
owner: &str,
repo: &str,
name: &str
) -> Result<Label>
pub async fn get_label(
&self,
owner: &str,
repo: &str,
name: &str
) -> Result<Label>
Get a label.
This function performs a GET
to the /repos/{owner}/{repo}/labels/{name}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#get-a-label
Parameters:
owner: &str
repo: &str
name: &str
sourcepub async fn delete_label(
&self,
owner: &str,
repo: &str,
name: &str
) -> Result<()>
pub async fn delete_label(
&self,
owner: &str,
repo: &str,
name: &str
) -> Result<()>
Delete a label.
This function performs a DELETE
to the /repos/{owner}/{repo}/labels/{name}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#delete-a-label
Parameters:
owner: &str
repo: &str
name: &str
sourcepub async fn update_label(
&self,
owner: &str,
repo: &str,
name: &str,
body: &IssuesUpdateLabelRequest
) -> Result<Label>
pub async fn update_label(
&self,
owner: &str,
repo: &str,
name: &str,
body: &IssuesUpdateLabelRequest
) -> Result<Label>
Update a label.
This function performs a PATCH
to the /repos/{owner}/{repo}/labels/{name}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#update-a-label
Parameters:
owner: &str
repo: &str
name: &str
sourcepub async fn list_milestones(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
sort: IssuesListMilestonesSort,
direction: Order,
per_page: i64,
page: i64
) -> Result<Vec<Milestone>>
pub async fn list_milestones(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
sort: IssuesListMilestonesSort,
direction: Order,
per_page: i64,
page: i64
) -> Result<Vec<Milestone>>
List milestones.
This function performs a GET
to the /repos/{owner}/{repo}/milestones
endpoint.
FROM: https://docs.github.com/rest/reference/issues#list-milestones
Parameters:
owner: &str
repo: &str
state: crate::types::IssuesListState
– Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
.sort: crate::types::IssuesListMilestonesSort
– What to sort results by. Eitherdue_on
orcompleteness
.direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_milestones(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
sort: IssuesListMilestonesSort,
direction: Order
) -> Result<Vec<Milestone>>
pub async fn list_all_milestones(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
sort: IssuesListMilestonesSort,
direction: Order
) -> Result<Vec<Milestone>>
List milestones.
This function performs a GET
to the /repos/{owner}/{repo}/milestones
endpoint.
As opposed to list_milestones
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/issues#list-milestones
sourcepub async fn create_milestone(
&self,
owner: &str,
repo: &str,
body: &IssuesCreateMilestoneRequest
) -> Result<Milestone>
pub async fn create_milestone(
&self,
owner: &str,
repo: &str,
body: &IssuesCreateMilestoneRequest
) -> Result<Milestone>
Create a milestone.
This function performs a POST
to the /repos/{owner}/{repo}/milestones
endpoint.
FROM: https://docs.github.com/rest/reference/issues#create-a-milestone
Parameters:
owner: &str
repo: &str
sourcepub async fn get_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64
) -> Result<Milestone>
pub async fn get_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64
) -> Result<Milestone>
Get a milestone.
This function performs a GET
to the /repos/{owner}/{repo}/milestones/{milestone_number}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#get-a-milestone
Parameters:
owner: &str
repo: &str
milestone_number: i64
– milestone_number parameter.
sourcepub async fn delete_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64
) -> Result<()>
pub async fn delete_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64
) -> Result<()>
Delete a milestone.
This function performs a DELETE
to the /repos/{owner}/{repo}/milestones/{milestone_number}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#delete-a-milestone
Parameters:
owner: &str
repo: &str
milestone_number: i64
– milestone_number parameter.
sourcepub async fn update_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64,
body: &IssuesCreateMilestoneRequest
) -> Result<Milestone>
pub async fn update_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64,
body: &IssuesCreateMilestoneRequest
) -> Result<Milestone>
Update a milestone.
This function performs a PATCH
to the /repos/{owner}/{repo}/milestones/{milestone_number}
endpoint.
FROM: https://docs.github.com/rest/reference/issues#update-a-milestone
Parameters:
owner: &str
repo: &str
milestone_number: i64
– milestone_number parameter.
sourcepub async fn list_labels_for_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<Label>>
pub async fn list_labels_for_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<Label>>
List labels for issues in a milestone.
This function performs a GET
to the /repos/{owner}/{repo}/milestones/{milestone_number}/labels
endpoint.
FROM: https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone
Parameters:
owner: &str
repo: &str
milestone_number: i64
– milestone_number parameter.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_labels_for_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64
) -> Result<Vec<Label>>
pub async fn list_all_labels_for_milestone(
&self,
owner: &str,
repo: &str,
milestone_number: i64
) -> Result<Vec<Label>>
List labels for issues in a milestone.
This function performs a GET
to the /repos/{owner}/{repo}/milestones/{milestone_number}/labels
endpoint.
As opposed to list_labels_for_milestone
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone
sourcepub async fn list_for_authenticated_user(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<Issue>>
pub async fn list_for_authenticated_user(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<Issue>>
List user account issues assigned to the authenticated user.
This function performs a GET
to the /user/issues
endpoint.
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.
Parameters:
filter: crate::types::Filter
– Indicates which sorts of issues to return. Can be one of:
\*assigned
: Issues assigned to you
\*created
: Issues created by you
\*mentioned
: Issues mentioning you
\*subscribed
: Issues you’re subscribed to updates for
\*all
orrepos
: All issues the authenticated user can see, regardless of participation or creation.state: crate::types::IssuesListState
– Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
.labels: &str
– A list of comma separated label names. Example:bug,ui,@high
.sort: crate::types::IssuesListSort
– What to sort results by. Can be eithercreated
,updated
,comments
.direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
sourcepub async fn list_all_for_authenticated_user(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<Issue>>
pub async fn list_all_for_authenticated_user(
&self,
filter: Filter,
state: IssuesListState,
labels: &str,
sort: IssuesListSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<Issue>>
List user account issues assigned to the authenticated user.
This function performs a GET
to the /user/issues
endpoint.
As opposed to list_for_authenticated_user
, this function returns all the pages of the request at once.
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.
Auto Trait Implementations
impl !RefUnwindSafe for Issues
impl Send for Issues
impl Sync for Issues
impl Unpin for Issues
impl !UnwindSafe for Issues
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more