ePages 7.3.0 - DE_EPAGES/Core/API/GitLogParser.pm

Package DE_EPAGES::Core::API::GitLogParser

The purpose of this module is to parse the output of the 'git log' command in order to filter out information required for the manual steps in the release process.

Example
my $aGitLog = GetFileContentLines('git-log-p_6.17.41-6.17.42.txt');
my $aChangedAttributes = GetChangedAttributes($aGitLog);
@EXPORT_OK
GetChangedAttributes
GetCommits
GetJiraId

Functions

GetChangedAttributes
GetCommits
GetJiraId

GetChangedAttributes

Reads out the attributes which where added or removed in the lines of the given git diff.

Syntax
$aChangedAttribute = GetChangedAttributes($aGitDiffLines);
Input
$aGitDiffLines (ref.array)
the lines of a git diff file
Return
$aChangedAttributes (ref.array)
a list of the changed attribute aliases

GetCommits

Reads in the lines from the "git log -p" command as returns a list of the individual commits

Syntax
$aCommitStrings = GetCommits($aLinesOfGitDiff);
Input
$aGitDiffLines (ref.array)
A list with the lines of a git log
Return
$aCommitString (ref.array)
A list with the string representation of the individual commits

GetJiraId

Reads out the JIRA id from a git commit message

Syntax
$JiraId = GetJiraId($CommitMessage);
Input
$CommitMessage (string)
The title of a git commit
Return
$JiraId (string)
The ID of the JIRA ticket which is linked with the commit