2017 © Pedro Peláez
 

library github-tools

Helpful GitHub tools packed in a ZF2 module

image

pensiero/github-tools

Helpful GitHub tools packed in a ZF2 module

  • Saturday, March 25, 2017
  • by pensiero
  • Repository
  • 1 Watchers
  • 0 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

GitHub Tools module for ZF2

Created by Oscar Fanelli, (*1)

Introduction

ZF2 module that provides tools to connect your application with your GitHub repository via ZF2 console. What you can do?, (*2)

  • Automatically create a new PR (from develop to master) and a new draft release (its notes will contains the diff commits between develop and master)
  • Mark a repository as deployed

Installation

GitHub Tools work with composer. Make sure you have the composer.phar downloaded and you have a composer.json file at the root of your project. To install it, add the following line into your composer.json file:, (*3)

"require": {
    "pensiero/github-tools": "~1.0"
}

Requirements

Configuration

Use the config/github-tools.local.php.dist as blueprint configuration file: copy it to the config/autoload directory of your ZF2 application and remove the .dist extension from its name., (*4)

If you are using environment variables to store sensible informations of your projects (like auth keys) you can use the following ones: - GITHUB_ACCESS_TOKEN will override the github_access_token config - ENV will override the environment config - PROTOCOL and HOST will be combined in order to override the target_url config, (*5)

NOTE: if github_from_branch === github_to_branch, PR creation will be skipped and the release will be created with the diff commits against the latest release, (*6)

Available commands

Mark a repository as deployed

Will be marked the configurated GitHub repository as deployed, (*7)

php public/index.php github mark-repo-deployed

Create a new release

Will be created a new PR from github_from_branch to github_to_branch named with the new version name. Will be created a new draft release for github_to_branch named with the new version name., (*8)

Major, (*9)

New version name: get the latest release name and increment the major part of 1, according to semver., (*10)

Example: - Latest release: v2.0.3 - New release: v3.0.0, (*11)

php public/index.php github create-major-release

Minor, (*12)

New version name: get the latest release name and increment the minor part of 1, according to semver., (*13)

Example: - Latest release: v2.0.3 - New release: v2.1.0, (*14)

php public/index.php github create-minor-release

Patch, (*15)

New version name: get the latest release name and increment the patch part of 1, according to semver., (*16)

Example: - Latest release: v2.0.3 - New release: v2.0.4, (*17)

php public/index.php github create-patch-release

The Versions