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/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 parameterurlorattributes.With a requester where
Requester.is_lazy == True, this CompletableGithubObjects is partially initialized. This requires the url to be given via parameterurlorattributes. Any CompletableGithubObject created from this lazy object will be lazy itself if created with parameterurlorattributes.- 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
- create_comment(body: str) IssueComment
- delete_labels() None
- 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:
- Parameters:
assignee – deprecated, use assignees instead. assignee=None means to remove current assignee.
milestone – milestone=None means to remove current milestone.
- lock(lock_reason: str) None
- unlock() None
- get_comment(id: int) IssueComment
- get_comments(since: Opt[datetime] = NotSet) PaginatedList[IssueComment]
- get_events() PaginatedList[IssueEvent]
- get_labels() PaginatedList[Label]
- get_reactions() PaginatedList[Reaction]
- get_sub_issues() PaginatedList[SubIssue]
- add_sub_issue(sub_issue: int | Issue) SubIssue
- Calls:
- Parameters:
sub_issue – int (sub-issue ID) or Issue object. Note: Use sub_issue.id, not sub_issue.number
- Return type:
- remove_sub_issue(sub_issue: int | Issue) SubIssue
- Calls:
DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue
- Parameters:
sub_issue – int (sub-issue ID) or Issue object. Note: Use sub_issue.id, not sub_issue.number
- Return type:
- prioritize_sub_issue(sub_issue: int | Issue, after_sub_issue: int | Issue | None) SubIssue
- Calls:
PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority
- Parameters:
sub_issue – int (sub-issue ID) or Issue object. Note: Use sub_issue.id, not sub_issue.number
after_sub_issue – int (sub-issue ID) or Issue object. Note: Use sub_issue.id, not sub_issue.number
- Return type:
- delete_reaction(reaction_id: int) bool
- get_timeline() PaginatedList[TimelineEvent]
- get_blocked_by() PaginatedList[Issue]
- get_blocking() PaginatedList[Issue]