PHP Class Bart\Git\Commit

Afficher le fichier Open project: box/bart Class Usage Examples

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
gitShowFormatOutput ( string $format, string $exceptionMsg ) : string The output from git show with a specific format (--format={$format} flag) and suppressed diff output (-s flag)

Method Details

__construct() public méthode

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 méthode

public __toString ( ) : string
Résultat string

author() public méthode

The author of the commit (person who originally wrote the work)
public author ( ) : Person
Résultat Person

committer() public méthode

The committer of the commit (person who last applied the work)
public committer ( ) : Person
Résultat Person

gerritChangeId() public méthode

public gerritChangeId ( ) : string
Résultat string Gerrit Change-Id

getProjectName() public méthode

public getProjectName ( ) : string
Résultat string Name of the repository in which commit was made. This may or may not include the ".git" suffix

jiras() public méthode

public jiras ( ) : Bart\Jira\JiraIssue[]
Résultat Bart\Jira\JiraIssue[] Any matched Jira Issue from commit message

message() public méthode

Deprecation: {@see \self::messageFull()}
public message ( )

messageFull() public méthode

public messageFull ( ) : string
Résultat string The full commit log message

messageRawBody() public méthode

public messageRawBody ( ) : string
Résultat string The unwrapped subject and body of the commit message (just the log message, not the author, etc.)

messageSubject() public méthode

public messageSubject ( ) : string
Résultat string The first non-blank lines of the commit message

rawFileContents() public méthode

public rawFileContents ( string $filePath ) : string
$filePath string the path to the file from the project root
Résultat string The raw contents of the file

revision() public méthode

public revision ( ) : string
Résultat string Revision revision