gitea.comment
comment
Gitea Comment resource.
Classes
gitea.comment.AsyncComment
Bases: BaseComment, AsyncResource
Asynchronous Gitea Comment resource.
Source code in src/gitea/resource/async_resource.py
Methods:
gitea.comment.AsyncComment.list_comments
async
list_comments(
owner: str,
repository: str,
index: int,
page: int | None = None,
limit: int | None = None,
**kwargs: Any,
) -> tuple[list[dict[str, Any]], dict[str, Any]]
List comments on an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
index
|
int
|
The index of the issue. |
required |
page
|
int | None
|
The page number for pagination. |
None
|
limit
|
int | None
|
The number of comments per page. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[list[dict[str, Any]], dict[str, Any]]
|
A tuple containing a list of comments as dictionaries and a dictionary with metadata. |
Source code in src/gitea/comment/async_comment.py
gitea.comment.AsyncComment.create_comment
async
create_comment(
owner: str,
repository: str,
index: int,
body: str,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Create a comment on an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
index
|
int
|
The index of the issue. |
required |
body
|
str
|
The body of the comment. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the created comment as a dictionary and a dictionary with metadata. |
Source code in src/gitea/comment/async_comment.py
gitea.comment.AsyncComment.edit_comment
async
edit_comment(
owner: str,
repository: str,
comment_id: int,
body: str,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Edit a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
comment_id
|
int
|
The ID of the comment. |
required |
body
|
str
|
The new body of the comment. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the updated comment as a dictionary and a dictionary with metadata. |
Source code in src/gitea/comment/async_comment.py
gitea.comment.AsyncComment.delete_comment
async
delete_comment(
owner: str,
repository: str,
comment_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Delete a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
comment_id
|
int
|
The ID of the comment. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing an empty dictionary and a dictionary with metadata. |
Source code in src/gitea/comment/async_comment.py
gitea.comment.Comment
Bases: BaseComment, Resource
Gitea Comment resource.
Source code in src/gitea/resource/resource.py
Methods:
gitea.comment.Comment.list_comments
list_comments(
owner: str,
repository: str,
index: int,
page: int | None = None,
limit: int | None = None,
**kwargs: Any,
) -> tuple[list[dict[str, Any]], dict[str, Any]]
List comments on an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
index
|
int
|
The index of the issue. |
required |
page
|
int | None
|
The page number for pagination. |
None
|
limit
|
int | None
|
The number of comments per page. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[list[dict[str, Any]], dict[str, Any]]
|
A tuple containing a list of comments as dictionaries and a dictionary with metadata. |
Source code in src/gitea/comment/comment.py
gitea.comment.Comment.create_comment
create_comment(
owner: str,
repository: str,
index: int,
body: str,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Create a comment on an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
index
|
int
|
The index of the issue. |
required |
body
|
str
|
The body of the comment. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the created comment as a dictionary and a dictionary with metadata. |
Source code in src/gitea/comment/comment.py
gitea.comment.Comment.edit_comment
edit_comment(
owner: str,
repository: str,
comment_id: int,
body: str,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Edit a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
comment_id
|
int
|
The ID of the comment. |
required |
body
|
str
|
The new body of the comment. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing the updated comment as a dictionary and a dictionary with metadata. |
Source code in src/gitea/comment/comment.py
gitea.comment.Comment.delete_comment
delete_comment(
owner: str,
repository: str,
comment_id: int,
**kwargs: Any,
) -> tuple[dict[str, Any], dict[str, Any]]
Delete a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
The owner of the repository. |
required |
repository
|
str
|
The name of the repository. |
required |
comment_id
|
int
|
The ID of the comment. |
required |
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing an empty dictionary and a dictionary with metadata. |