Debian::...l::GitHub(3pm)
π NAME π
okay bestie, say hi to Debian::PkgPerl::GitHub(3pm) β it's the module that helps you forward a bug or a patch to GitHub π¦ (it lives in the Debian Perl packaging Tools family, and yes, it's a Perl module, section 3pm, we're fancy like that π
)
β¨ SYNOPSIS β¨
use Debian::PkgPerl::Bug;
use Debian::PkgPerl::Patch;
use Debian::PkgPerl::Message;
use Debian::PkgPerl::GitHub;
my %params = (
url => 'https://github.com/foo/bar/issues',
tracker => 'github',
dist => 'Foo-Bar',
name => 'My Name',
email => 'my.name@example.com',
mailto => 'your.name@example.com',
);
my %bug_info = Debian::PkgPerl::Bug
->new( bug => 123 )
->retrieve_bug_info();
my $bug_msg = Debian::PkgPerl::Message->new(
%params,
info => \%bug_info,
);
print Debian::PkgPerl::GitHub->new(
message => $bug_msg,
ticket => 456,
)->forward();
my %patch_info = Debian::PkgPerl::Patch
->new( patch => 'foo-bar.patch' )
->retrieve_patch_info();
my $patch_msg = Debian::PkgPerl::Message->new(
%params,
info => \%patch_info,
);
print Debian::PkgPerl::GitHub->new(
message => $patch_msg,
fallback => 0,
)->forward();
πΈ DESCRIPTION πΈ
So this module exports a lil squad of helpers whose whole job is supporting the forwarding of patches to GitHub as pull requests. That's it, that's the mission. π
π METHODS π
π new(%params)
Making a new object, and here's what you can hand it:
messageβ the message you wanna forward to an upstream project. Literally the whole point. πticketβ an existing issue number, if you're forwarding the bug to that issue. π―fallbackβ turns on the fallback of forwarding a patch as an issue if the pull-request fails for any reason. Default is false. π
Environment:
DPT_GITHUB_OAUTHβ GitHub personal API token. No default. You gotta bring your own, bestie. πDPT_GITHUB_ORGNAMEβ the organization used to fork upstreams. Defaults topkg-perl-tools.DPT_GITHUB_BRANCHβ branch name for pull requests. Defaults to"pkg-perl-$^T".DPT_GITHUB_PROTOCOLβ protocol used to clone a repository. Defaults tossh. Accepted protocols:ssh,https.
π fork_exists()
Checks if any member in the GitHub organization has already forked a repository. π
Returns:
Boolean value. (yes/no, true/false, iconic behavior)
π¦ create_fork()
Creates a repository fork by an organization.
Returns:
The new forked repository. it's giving new baby repo energy fr fr π
π clone_branch_patch_push()
Clones a repository in a temporary directory, creates a new branch, applies the patch, commits the change, pushes it and removes the temporary working copy. Full pipeline, no notes. π₯
Returns:
Nothing. (it did all the work and dipped π¨)
β create_pull_request()
Returns:
Pull request URL on success, nothing otherwise.
π forward_patch_as_pull_request()
π forward_patch_as_ticket()
Fallback to forwarding a patch as a bug. π
Returns:
Issue URL on success, nothing otherwise.
π§ forward_bug_as_issue()
π§ forward()
Forward an issue as a pull request or bug.
π test()
Support for off-line testing. (your lil sandbox moment β¨)
π LICENSE AND COPYRIGHT π
Copyright 2016 Alex Muntada.
Copyright 2018 Damyan Ivanov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
and that's the whole page, bestie!! π«Ά this beauty comes to you from pkg-perl-tools version 0.88, dated 2026-04-01, filed under Debian::PkgPerl::GitHub(3pm) β go forth and forward those patches, mwah ππ
π¦ where this page comes from
- ubuntu stonking: pkg-perl-tools 0.88 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms