Comment
NOTE: Intended instantiation via PullRequest
get_comments
method, rather than direct initialisation.
This class represents a comment on either an Issue or a PullRequest.
It may be used to perform actions within the context of the comment.
Attributes:
Name | Type | Description |
---|---|---|
identifier |
int
|
Unique identifier of the organisation within GitHub |
client |
Session
|
Session used to make requests to the RESTAPI, intended to be passed in when instance is created via Client |
base_url |
str
|
Base URL we should use for querying the RESTAPI within the context of the comment |
parent_identifier |
str
|
Identifier of the PullRequest/Issue which this comment relates to |
repository_name |
str
|
Name of the repository this comment relates to |
pull_request |
bool
|
If this comment is associated with a pull request |
issue |
bool
|
If this comment is associated with an issue |
body |
str
|
The body of the comment |
__eq__(other)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
object
|
Object to compare against |
required |
Returns:
Type | Description |
---|---|
bool
|
True if instances are equal, False otherwise. |
__hash__()
Returns:
Type | Description |
---|---|
int
|
Unique int representation of instance. |
__str__()
Returns:
Type | Description |
---|---|
str
|
Information string representation |
delete()
Returns:
Type | Description |
---|---|
bool
|
True if deleted, else False. |
overwrite(body)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
str
|
Content to overwrite the existing comment body with. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if overwritten, else False. |
update(body)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
str
|
Additional content to append to the existing comment body. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if appended, else False. |