ePages 7.19.0 - DE_EPAGES/Core/API/GitHub.pm

Package DE_EPAGES::Core::API::GitHub

This module provides GitHub API functionality.

Example
my $GitHub = DE_EPAGES::Core::API::GitHub->new($User, $Password);
@EXPORT_OK
CreatePullRequest
MergePullRequest
IsMergeable
IsMerged

Functions

CreatePullRequest
IsMergeable
IsMerged
MergePullRequest
new

CreatePullRequest

Create a pull request of a given feature branch to branch.

Syntax
$self->CreatePullRequest($Title, $FeatureBranch, $Branch, $Comment);
Input
$Title (string)
title for the pull request
$FeatureBranch (string
e.g. 'build/version_6_17_33'
e.g. for other repositories/forks <github-username>:build/version_6_17_33)
branch to create pull request from
$TargetBranch (string)
the branch where the changes should be
$Repo (string)
repository where the branches are
$Comment (string)
any comments for the pull request
Return
$PRID (int)
number of the pull request on GitHub

IsMergeable

Check if a pull request is mergeable.

Syntax
$self->IsMergeable($PRID);
Input
$PRID (int)
number of the pull request on GitHub
$Repo (string)
repository where the branches are
Return
(bool)
1, if pull request is mergeable, 0 otherwise

IsMerged

Check if a pull request is mergeable.

Syntax
$self->IsMerged($PRID);
Input
$PRID (int)
number of the pull request on GitHub
$Repo (string)
repository where the branches are
Return
(bool)
1, if pull request is mergeable, 0 otherwise

MergePullRequest

Merge a pull request in GitHub.

Syntax
$self->MergePullRequest($CommitMessage);
Input
$CommitMessage (string)
message to comment the merge commit
$PRID (int)
number of the pull request on GitHub
$Repo (string)
repository where the branches are
Return
$MergeID (string)
commit ID of the merge commit

new

Create a GitHub object.

Syntax
$GitHub = DE_EPAGES::Core::API::GitHub->new();
Input
$User (string)
username of the GitHub account to push changes to
$Password (string)
password or API token of the GitHub account
$Account (string)
optional; the owner GitHub account of the target repository.
Default: $User
Return
$GitHubObject (object)
GitHub object