Elgg  Version master
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\Project\ChangelogWriter Class Reference

Helper class to write the changelog during release. More...

Public Member Functions

array __construct (array $options=[])
 Constructor. More...
 
 __invoke ()
 Write the changelog for the current release. More...
 

Protected Member Functions

 readNotes ()
 Read anything in the changelog before the first '' and consider this release notes. More...
 
 getGitTags ()
 Get the current git tags. More...
 
 getGitCommits (array $options)
 Get all the commits. More...
 
 getGitContributors (array $options=[])
 Get the contributors. More...
 
 formatCommits (array $commits)
 Format the different commits into sections. More...
 
 formatContributors (array $contributors)
 Format the contributors into a section. More...
 
 formatHeader ()
 Format release header. More...
 
 makeCommitLink (array $commit)
 Get a link to a GitHub commit. More...
 
 makeIssueLink (int $issue_id)
 Generate a link to a GitHub issue. More...
 
 writeChangelog (string $release_notes)
 Write the release notes to the changelog. More...
 
 executeCommand (string $command)
 Execute a command. More...
 
 getOption (string $option, mixed $default=null)
 Get an option. More...
 

Protected Attributes

array $options
 
array $commit_types
 

Detailed Description

Helper class to write the changelog during release.

Since
5.1

Definition at line 13 of file ChangelogWriter.php.

Constructor & Destructor Documentation

array Elgg\Project\ChangelogWriter::__construct ( array  $options = [])

Constructor.

Parameters
array$optionswriter options

Definition at line 32 of file ChangelogWriter.php.

Member Function Documentation

Elgg\Project\ChangelogWriter::__invoke ( )

Write the changelog for the current release.

Returns
void

Definition at line 59 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::executeCommand ( string  $command)
protected

Execute a command.

Parameters
string$commandthe command to execute
Returns
null|array

Definition at line 468 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::formatCommits ( array  $commits)
protected

Format the different commits into sections.

Parameters
array$commitsall the commits
Returns
string

Definition at line 277 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::formatContributors ( array  $contributors)
protected

Format the contributors into a section.

Parameters
array$contributorscontributors
Returns
string

Definition at line 368 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::formatHeader ( )
protected

Format release header.

Returns
string

Definition at line 387 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::getGitCommits ( array  $options)
protected

Get all the commits.

Parameters
array$optionsoptions
Returns
array

Definition at line 114 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::getGitContributors ( array  $options = [])
protected

Get the contributors.

Parameters
array$optionsoptions
Returns
array

Definition at line 223 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::getGitTags ( )
protected

Get the current git tags.

Returns
array

Definition at line 103 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::getOption ( string  $option,
mixed  $default = null 
)
protected

Get an option.

Parameters
string$optionname op the option
mixed$defaultdefault value
Returns
mixed

Definition at line 489 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::makeCommitLink ( array  $commit)
protected

Get a link to a GitHub commit.

Parameters
array$commitcommit information
Returns
string

Definition at line 411 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::makeIssueLink ( int  $issue_id)
protected

Generate a link to a GitHub issue.

Parameters
int$issue_idthe issue ID
Returns
string

Definition at line 430 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::readNotes ( )
protected

Read anything in the changelog before the first '' and consider this release notes.

Returns
string

Definition at line 88 of file ChangelogWriter.php.

Elgg\Project\ChangelogWriter::writeChangelog ( string  $release_notes)
protected

Write the release notes to the changelog.

Parameters
string$release_notesrelease notes
Returns
void

Definition at line 449 of file ChangelogWriter.php.

Member Data Documentation

array Elgg\Project\ChangelogWriter::$commit_types
protected
Initial value:
= [
'feature' => 'Features'

Definition at line 17 of file ChangelogWriter.php.

array Elgg\Project\ChangelogWriter::$options
protected

Definition at line 15 of file ChangelogWriter.php.


The documentation for this class was generated from the following file: