PHP Класс Bart\Git\Commit

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Bart\Git\GitRoot $root, string $revision, string $projectName = null )
__toString ( ) : string
author ( ) : Person The author of the commit (person who originally wrote the work)
committer ( ) : Person The committer of the commit (person who last applied the work)
gerritChangeId ( ) : string
getProjectName ( ) : string
jiras ( ) : Bart\Jira\JiraIssue[]
message ( )
messageFull ( ) : string
messageRawBody ( ) : string
messageSubject ( ) : string
rawFileContents ( string $filePath ) : string
revision ( ) : string

Приватные методы

Метод Описание
gitShowFormatOutput ( string $format, string $exceptionMsg ) : string The output from git show with a specific format (--format={$format} flag) and suppressed diff output (-s flag)

Описание методов

__construct() публичный Метод

public __construct ( Bart\Git\GitRoot $root, string $revision, string $projectName = null )
$root Bart\Git\GitRoot Root of repo on disk
$revision string The revision label of commit, typically the hash.
$projectName string Project in which commit was made. This defaults to `null` for backwards compatibility See `man git-rev-parse` "SPECIFYING REVISIONS" for valid names

__toString() публичный Метод

public __toString ( ) : string
Результат string

author() публичный Метод

The author of the commit (person who originally wrote the work)
public author ( ) : Person
Результат Person

committer() публичный Метод

The committer of the commit (person who last applied the work)
public committer ( ) : Person
Результат Person

gerritChangeId() публичный Метод

public gerritChangeId ( ) : string
Результат string Gerrit Change-Id

getProjectName() публичный Метод

public getProjectName ( ) : string
Результат string Name of the repository in which commit was made. This may or may not include the ".git" suffix

jiras() публичный Метод

public jiras ( ) : Bart\Jira\JiraIssue[]
Результат Bart\Jira\JiraIssue[] Any matched Jira Issue from commit message

message() публичный Метод

Устаревший: {@see \self::messageFull()}
public message ( )

messageFull() публичный Метод

public messageFull ( ) : string
Результат string The full commit log message

messageRawBody() публичный Метод

public messageRawBody ( ) : string
Результат string The unwrapped subject and body of the commit message (just the log message, not the author, etc.)

messageSubject() публичный Метод

public messageSubject ( ) : string
Результат string The first non-blank lines of the commit message

rawFileContents() публичный Метод

public rawFileContents ( string $filePath ) : string
$filePath string the path to the file from the project root
Результат string The raw contents of the file

revision() публичный Метод

public revision ( ) : string
Результат string Revision revision