Issue

class github.Issue.Issue

This class represents Issues.

The reference can be found here https://docs.github.com/en/rest/reference/issues

as_pull_request() → PullRequest
Calls

GET /repos/{owner}/{repo}/pulls/{number}

add_to_assignees(*assignees: NamedUser | str) → None
Calls

POST /repos/{owner}/{repo}/issues/{number}/assignees

add_to_labels(*labels: Label | str) → None
Calls

POST /repos/{owner}/{repo}/issues/{number}/labels

create_comment(body: str) → IssueComment
Calls

POST /repos/{owner}/{repo}/issues/{number}/comments

delete_labels() → None
Calls

DELETE /repos/{owner}/{repo}/issues/{number}/labels

edit(title: Opt[str] = NotSet, body: Opt[str] = NotSet, assignee: Opt[str | NamedUser | None] = NotSet, state: Opt[str] = NotSet, milestone: Opt[Milestone | None] = NotSet, labels: Opt[list[str]] = NotSet, assignees: Opt[list[NamedUser | str]] = NotSet, state_reason: Opt[str] = NotSet) → None
Calls

PATCH /repos/{owner}/{repo}/issues/{number}

Parameters
  • assignee – deprecated, use assignees instead. assignee=None means to remove current assignee.

  • milestonemilestone=None means to remove current milestone.

lock(lock_reason: str) → None
Calls

PUT /repos/{owner}/{repo}/issues/{issue_number}/lock

unlock() → None
Calls

DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock

get_comment(id: int) → IssueComment
Calls

GET /repos/{owner}/{repo}/issues/comments/{id}

get_comments(since: Opt[datetime] = NotSet) → PaginatedList[IssueComment]
Calls

GET /repos/{owner}/{repo}/issues/{number}/comments

get_events() → PaginatedList[IssueEvent]
Calls

GET /repos/{owner}/{repo}/issues/{issue_number}/events

get_labels() → PaginatedList[Label]
Calls

GET /repos/{owner}/{repo}/issues/{number}/labels

remove_from_assignees(*assignees: NamedUser | str) → None
Calls

DELETE /repos/{owner}/{repo}/issues/{number}/assignees

remove_from_labels(label: Label | str) → None
Calls

DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name}

set_labels(*labels: Label | str) → None
Calls

PUT /repos/{owner}/{repo}/issues/{number}/labels

get_reactions() → PaginatedList[Reaction]
Calls

GET /repos/{owner}/{repo}/issues/{number}/reactions

create_reaction(reaction_type: str) → Reaction
Calls

POST /repos/{owner}/{repo}/issues/{number}/reactions

delete_reaction(reaction_id: int) → bool
Calls

DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}

get_timeline() → PaginatedList[TimelineEvent]
Calls

GET /repos/{owner}/{repo}/issues/{number}/timeline