PHP Classes

PHP Git Change Log Creator: Read git repository logs and create change logs

Recommend this page to a friend!
  Info   View files Example   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (3 days ago) RSS 2.0 feedNot enough user ratingsTotal: 206 All time: 8,396 This week: 104Up
Version License PHP version Categories
gitchangelogcreator 1.0.12GNU General Publi...7.1PHP 5, Tools, Files and Folders, Proj...
Description 

Author

This class can read git repository logs and create change logs.

It executes the git command to make it return the log of changes from a git repository.

The class parses the logs to extract date, committer and message of each logged change.

It generates a file in Markdown format the extracted log information and links to the respective commits.

Picture of Michael Cummings
  Performance   Level  
Name: Michael Cummings <contact>
Classes: 9 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Example

<?php
declare(strict_types=1);

/**
 * Contains php example using GitChangeLogCreator class.
 *
 * PHP version 7.1
 *
 * LICENSE:
 * This file is part of git-change-log-creator which is used to create an
 * updated change log file from Git log.
 * Copyright (C) 2014-2019 Michael Cummings
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation, either version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see
 * <https://opensource.org/licenses/GPL-2.0>.
 *
 * You should be able to find a copy of this license in the LICENSE file.
 *
 * @copyright 2014-2019 Michael Cummings
 * @license GPL-2.0
 * @author Michael Cummings <mgcummings@yahoo.com>
 */

use GitChangeLogCreator\GitChangeLogCreator;

include_once
__DIR__ . '/bootstrap.php';
try {
   
$git = new GitChangeLogCreator();
   
$git->getTags()
        ->
getLogs()
        ->
contentGenerator()
        ->
fileGenerate();
} catch (
Exception $e) {
    echo
$e->getMessage();
}


Details

README.md

Used to create an updated change log file from Git log.

For an example of the generated output see CHANGELOG.md.

You can find a copy of the license in LICENSE.

For a simple example on how to use the class look at example.php


  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file .coveralls.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
Accessible without login Plain text file CHANGELOG.md Output Sample output
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Data Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file GitChangeLogCreator.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:206
This week:0
All time:8,396
This week:104Up