Pithub::Issues(3pm)

πŸ“¦
version 0.01043 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

🌸 Pithub::Issues β€” the manual page, but make it cute

okay bestie, so this is Pithub::Issues(3pm), a User Contributed Perl Documentation situation, and it's literally the Github v3 Issues API. yes THE issues API. the one where all your problems (and also your bug reports) live. let's get into it πŸ’…


✨ NAME ✨

Pithub::Issues β€” Github v3 Issues API. that's it, that's the vibe. πŸ™


πŸŽ€ VERSION πŸŽ€

version 0.01043 β€” yes, a real number, don't come for me 🫢


πŸ‘‘ METHODS πŸ‘‘

here come the methods, and there are a LOT of them, so buckle up buttercup 🌈

πŸ’œ assignees

gives you access to Pithub::Issues::Assignees. slay, go get your people ✨

πŸ’œ comments

gives you access to Pithub::Issues::Comments. the discourse zone, iykyk πŸ’¬

πŸ’œ create

  • Create an issue β€” yes, you can just make one. main character energy fr.
POST /repos/:user/:repo/issues

Parameters:

  • user: mandatory string
  • repo: mandatory string
  • data: mandatory hashref, having following keys:
    • title: mandatory string
    • body: optional string
    • assignee: optional string β€” Login for the user that this issue should be assigned to.
    • milestone: optional number β€” Milestone to associate this issue with.
    • labels: optional arrayref of strings β€” Labels to associate with this issue.

Examples:

my $i = Pithub::Issues->new;
my $result = $i->create(
    user => 'plu',
    repo => 'Pithub',
    data => {
        assignee  => 'octocat',
        body      => "I'm having a problem with this.",
        labels    => [ 'Label1', 'Label2' ],
        milestone => 1,
        title     => 'Found a bug'
    }
);

Response: Status: 201 Created

{
    "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
    "html_url": "https://github.com/octocat/Hello-World/issues/1",
    "number": 1347,
    "state": "open",
    "title": "Found a bug",
    "body": "I'm having a problem with this.",
    "user": {
        "login": "octocat",
        "id": 1,
        "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
        "url": "https://api.github.com/users/octocat"
    },
    "labels": [
    {
        "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
        "name": "bug",
        "color": "f29513"
    }
    ],
    "assignee": {
        "login": "octocat",
        "id": 1,
        "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
        "url": "https://api.github.com/users/octocat"
    },
    "milestone": {
        "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
        "number": 1,
        "state": "open",
        "title": "v1.0",
        "description": "",
        "creator": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "open_issues": 4,
        "closed_issues": 8,
        "created_at": "2011-04-10T20:09:31Z",
        "due_on": null
    },
    "comments": 0,
    "pull_request": {
        "html_url": "https://github.com/octocat/Hello-World/issues/1",
        "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
        "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
    },
    "closed_at": null,
    "created_at": "2011-04-22T13:33:48Z",
    "updated_at": "2011-04-22T13:33:48Z"
}

πŸ’œ events

gives you access to Pithub::Issues::Events. everything that ever happened, we love a timeline πŸ¦‹

πŸ’œ get

  • Get a single issue β€” just the one. one (1) issue. iconic.
GET /repos/:user/:repo/issues/:id

Parameters:

  • user: mandatory string
  • repo: mandatory string
  • issue_id: mandatory integer

Examples:

my $i = Pithub::Issues->new;
my $result = $i->get(
    user => 'plu',
    repo => 'Pithub',
    issue_id => 1,
);

Response: Status: 200 OK

{
    "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
    "html_url": "https://github.com/octocat/Hello-World/issues/1",
    "number": 1347,
    "state": "open",
    "title": "Found a bug",
    "body": "I'm having a problem with this.",
    "user": {
        "login": "octocat",
        "id": 1,
        "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
        "url": "https://api.github.com/users/octocat"
    },
    "labels": [
    {
        "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
        "name": "bug",
        "color": "f29513"
    }
    ],
    "assignee": {
        "login": "octocat",
        "id": 1,
        "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
        "url": "https://api.github.com/users/octocat"
    },
    "milestone": {
        "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
        "number": 1,
        "state": "open",
        "title": "v1.0",
        "description": "",
        "creator": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "open_issues": 4,
        "closed_issues": 8,
        "created_at": "2011-04-10T20:09:31Z",
        "due_on": null
    },
    "comments": 0,
    "pull_request": {
        "html_url": "https://github.com/octocat/Hello-World/issues/1",
        "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
        "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
    },
    "closed_at": null,
    "created_at": "2011-04-22T13:33:48Z",
    "updated_at": "2011-04-22T13:33:48Z"
}

πŸ’œ labels

gives you access to Pithub::Issues::Labels. tag it, organize it, make it make sense 🏷️

πŸ’œ list

  • List the issues of the authenticated user β€” your issues. specifically YOURS. no cap.
GET /issues

This API call can be influenced via the "params" hashref with following parameters:

  • filter: one of the following:
    • assigned: Issues assigned to you (default)
    • created: Issues created by you
    • mentioned: Issues mentioning you
    • subscribed: Issues you're subscribed to updates for
  • state: one of the following:
    • open (default)
    • closed
  • labels: String list of comma separated Label names. Example: "bug,ui,@high"
  • sort: one of the following:
    • created (default)
    • updated
    • comments
  • direction: one of the following:
    • asc
    • desc (default)
  • since: optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

Examples:

my $i      = Pithub::Issues->new;
my $result = $i->list(
    params => {
        filter    => 'assigned',
        state     => 'open',
        labels    => 'bug',
        sort      => 'updated',
        direction => 'asc',
    }
);

Response: Status: 200 OK

[
    {
        "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
        "html_url": "https://github.com/octocat/Hello-World/issues/1",
        "number": 1347,
        "state": "open",
        "title": "Found a bug",
        "body": "I'm having a problem with this.",
        "user": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "labels": [
        {
            "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
            "name": "bug",
            "color": "f29513"
        }
        ],
        "assignee": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "milestone": {
            "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
            "number": 1,
            "state": "open",
            "title": "v1.0",
            "description": "",
            "creator": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "open_issues": 4,
            "closed_issues": 8,
            "created_at": "2011-04-10T20:09:31Z",
            "due_on": null
        },
        "comments": 0,
        "pull_request": {
            "html_url": "https://github.com/octocat/Hello-World/issues/1",
            "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
            "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
        },
        "closed_at": null,
        "created_at": "2011-04-22T13:33:48Z",
        "updated_at": "2011-04-22T13:33:48Z"
    }
]
  • List issues for a repository β€” the whole repo's tea, all at once πŸ«–
GET /repos/:user/:repo/issues

Parameters:

  • user: mandatory string
  • repo: mandatory string

This API call can be influenced via the "params" hashref with following parameters:

  • milestone: one of the following:

and the milestone choices keep going like this:

  • "Integer" Milestone number
  • "none" for Issues with no Milestone
  • "*" for Issues with any Milestone
  • state β€” one of the following:
    • open (default)
    • closed
  • assignee β€” one of the following:
    • "String" User login
    • "none" for Issues with no assigned User
    • "*" for Issues with any assigned User
  • mentioned β€” String User login
  • labels β€” String list of comma separated Label names. Example: "bug,ui,@high"
  • sort β€” one of the following:
    • created (default)
    • updated
    • comments
  • direction β€” one of the following:
    • asc
    • desc (default)
  • since β€” optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

Examples

my $i      = Pithub::Issues->new;
my $result = $i->list(
    user    => 'plu',
    repo    => 'Pithub',
    params => {
        milestone => 42,
        state     => 'open',
        labels    => 'bug',
        sort      => 'updated',
        direction => 'asc',
    }
);

Response: Status: 200 OK

[
    {
        "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
        "html_url": "https://github.com/octocat/Hello-World/issues/1",
        "number": 1347,
        "state": "open",
        "title": "Found a bug",
        "body": "I'm having a problem with this.",
        "user": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "labels": [
        {
            "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
            "name": "bug",
            "color": "f29513"
        }
        ],
        "assignee": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "milestone": {
            "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
            "number": 1,
            "state": "open",
            "title": "v1.0",
            "description": "",
            "creator": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "open_issues": 4,
            "closed_issues": 8,
            "created_at": "2011-04-10T20:09:31Z",
            "due_on": null
        },
        "comments": 0,
        "pull_request": {
            "html_url": "https://github.com/octocat/Hello-World/issues/1",
            "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
            "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
        },
        "closed_at": null,
        "created_at": "2011-04-22T13:33:48Z",
        "updated_at": "2011-04-22T13:33:48Z"
    }
]

milestones

Provides access to Pithub::Issues::Milestones.


update

  • Edit an issue
PATCH /repos/:user/:repo/issues/:id

Parameters:

  • user: mandatory string
  • repo: mandatory string
  • data: mandatory hashref, having following keys:
    • title: mandatory string
    • body: optional string
    • assignee: optional string - Login for the user that this issue should be assigned to.
    • milestone: optional number - Milestone to associate this issue with.
    • labels: optional arrayref of strings - Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty arrayref ([]) to clear all Labels from the Issue.

Examples:

my $i = Pithub::Issues->new;
my $result = $i->update(
    user     => 'plu',
    repo     => 'Pithub',
    issue_id => 1,
    data     => {
        assignee  => 'octocat',
        body      => "I'm having a problem with this.",
        labels    => [ 'Label1', 'Label2' ],
        milestone => 1,
        state     => 'open',
        title     => 'Found a bug'
    }
);

AUTHOR

Johannes Plunien <plu@cpan.org>


This software is copyright (c) 2011 by Johannes Plunien.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page, bestie πŸ’– this tea was brewed from Pithub::Issues(3pm), Perl v5.40.1, dated 2025-06-08 β€” go slay some GitHub issues βœ¨πŸ‘‘

πŸ“¦ where this page comes from