NAME
WWW::Gitea::API::Issues - Gitea issues API (issues and issue comments)
VERSION
version 0.003
SYNOPSIS
my $issues = $gitea->issues->list('getty', 'p5-www-gitea', state => 'open');
my $issue = $gitea->issues->create('getty', 'p5-www-gitea',
title => 'Bug', body => '...', labels => [1, 2],
);
my $c = $gitea->issues->create_comment('getty', 'p5-www-gitea',
$issue->number, 'thanks for the report');
DESCRIPTION
Controller for the Gitea issues API, including issue comments. Reached via $gitea->issues. Issues are addressed by their per-repository index (the number you see in the UI).
client
The parent WWW::Gitea client providing HTTP transport.
openapi_operations
Pre-computed operation table (operationId → {method, path}).
list
my $issues = $gitea->issues->list('getty', 'p5-www-gitea',
state => 'open', labels => 'bug', limit => 50);
Lists issues in a repository. Accepts the Gitea query parameters (state — open/closed/all, labels, q, type — issues/pulls, milestones, page, limit). Returns an ArrayRef of WWW::Gitea::Issue.
create
my $issue = $gitea->issues->create('getty', 'p5-www-gitea',
title => 'Bug report',
body => 'It broke',
labels => [1, 2], # label IDs
assignees => ['getty'],
milestone => 42,
);
Creates an issue. title is required; other arguments are passed through as the JSON body. Returns a WWW::Gitea::Issue.
get
my $issue = $gitea->issues->get('getty', 'p5-www-gitea', 7);
Fetches an issue by its repository index. Returns a WWW::Gitea::Issue.
edit
$gitea->issues->edit('getty', 'p5-www-gitea', 7, state => 'closed');
Edits an issue (title, body, state — open/closed, assignees, milestone, ...). Arguments are passed through as the JSON body. Returns the updated WWW::Gitea::Issue.
search
my $issues = $gitea->issues->search(q => 'crash', state => 'open');
Searches issues across all accessible repositories (GET /repos/issues/search). Accepts the Gitea query parameters (state, labels, milestones, q, type, owner, team, page, limit). Returns an ArrayRef of WWW::Gitea::Issue.
comments
my $comments = $gitea->issues->comments('getty', 'p5-www-gitea', 7);
my $page2 = $gitea->issues->comments('getty', 'p5-www-gitea', 7, page => 2, limit => 50);
Lists the comments on an issue. Accepts the Gitea query parameters (page, limit, since, before). Returns an ArrayRef of WWW::Gitea::Comment.
create_comment
my $comment = $gitea->issues->create_comment(
'getty', 'p5-www-gitea', 7, 'thanks!');
Adds a comment to an issue. Returns the new WWW::Gitea::Comment.
attachments
my $attachments = $gitea->issues->attachments('getty', 'p5-www-gitea', 7);
Lists the attachments on an issue. Accepts the Gitea query parameters (page, limit). Returns an ArrayRef of WWW::Gitea::Attachment.
create_attachment
my $a = $gitea->issues->create_attachment('getty', 'p5-www-gitea', 7,
file => '/path/to/log.txt', name => 'log.txt');
my $a = $gitea->issues->create_attachment('getty', 'p5-www-gitea', 7,
content => $bytes, name => 'log.txt');
Uploads an attachment to an issue via multipart/form-data. Pass either file (a path on disk) or content (raw bytes); name sets the display name (name query parameter), filename the multipart part filename. Returns a WWW::Gitea::Attachment.
get_attachment
my $a = $gitea->issues->get_attachment('getty', 'p5-www-gitea', 7, 12);
Fetches a single issue attachment by its numeric attachment id. Returns a WWW::Gitea::Attachment.
edit_attachment
$gitea->issues->edit_attachment('getty', 'p5-www-gitea', 7, 12,
name => 'renamed.txt');
Edits an issue attachment (only name is editable). Arguments are passed through as the JSON body. Returns the updated WWW::Gitea::Attachment.
delete_attachment
$gitea->issues->delete_attachment('getty', 'p5-www-gitea', 7, 12);
Deletes an issue attachment by its numeric attachment id. Returns a true value on success.
comment_attachments
my $attachments =
$gitea->issues->comment_attachments('getty', 'p5-www-gitea', 99);
Lists the attachments on a comment (addressed by comment id). Accepts the Gitea query parameters (page, limit). Returns an ArrayRef of WWW::Gitea::Attachment.
create_comment_attachment
my $a = $gitea->issues->create_comment_attachment('getty', 'p5-www-gitea',
99, file => '/path/to/log.txt', name => 'log.txt');
Uploads an attachment to a comment via multipart/form-data. Same file / content / name / filename arguments as "create_attachment". Returns a WWW::Gitea::Attachment.
get_comment_attachment
my $a = $gitea->issues->get_comment_attachment('getty', 'p5-www-gitea',
99, 12);
Fetches a single comment attachment by its numeric attachment id. Returns a WWW::Gitea::Attachment.
edit_comment_attachment
$gitea->issues->edit_comment_attachment('getty', 'p5-www-gitea', 99, 12,
name => 'renamed.txt');
Edits a comment attachment (only name is editable). Arguments are passed through as the JSON body. Returns the updated WWW::Gitea::Attachment.
delete_comment_attachment
$gitea->issues->delete_comment_attachment('getty', 'p5-www-gitea', 99, 12);
Deletes a comment attachment by its numeric attachment id. Returns a true value on success.
SEE ALSO
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://codeberg.org/getty/p5-www-gitea/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.