Issue

class github.Issue.Issue

This class represents Issues.

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

The OpenAPI schema can be found at - /components/schemas/issue - /components/schemas/issue-search-result-item - /components/schemas/nullable-issue

A CompletableGithubObject can be partially initialised (completed=False). Accessing attributes that are not initialized will then trigger a request to complete all attributes.

A partially initialized CompletableGithubObject (completed=False) can be completed via complete(). This requires the url to be given via parameter url or attributes.

With a requester where Requester.is_lazy == True, this CompletableGithubObjects is partially initialized. This requires the url to be given via parameter url or attributes. Any CompletableGithubObject created from this lazy object will be lazy itself if created with parameter url or attributes.

Parameters
  • requester – requester

  • headers – response headers

  • attributes – attributes to initialize

  • completed – do not update non-initialized attributes when True

  • url – url of this instance, overrides attributes[‘url’]

  • accept – use this accept header when completing this instance

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