2017 © Pedro Peláez
 

library issues

wrapper for github and jira issues

image

digitalkaoz/issues

wrapper for github and jira issues

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

issues

a PHP wrapper for various issue tracker, (*1)

Build Status Dependency Status Scrutinizer Code Quality Code Coverage SensioLabsInsight Latest Stable Version Total Downloads StyleCI, (*2)

Installation

$ composer require digitalkaoz/issues

Trackers

currently these are the supported Trackers:, (*3)

<?php

$github = new GithubTracker($token = null);

$jira   = new JiraTracker($host, $username = null, $password = null);

$gitlab = new GitlabTracker($host, $token = null);

$bitbucket = new BitbucketTracker($username = null, $password = null);

Usage

The Library contains a simple Application to search various Trackers:, (*4)

$ bin/issues search -u TOKEN github digitalkaoz/issues                     # search github
$ bin/issues search -u TOKEN -h gitlab.domain.com gitlab foo/*             # search gitlab
$ bin/issues search -u USER -p PWD -d https://jira.domain.com jira PROJKEY # search jira
$ bin/issues search -u USER -p PWD -d bitbucket gentlero/bitbucket-api     # search bitbucket

to use it programmatic:, (*5)

<?php

$tracker = new GithubTracker($token); // or any other Tracker

$project = $tracker->getProject('digitalkaoz/issues'); //Rs/Issues/Project
$projects = $tracker->findProjects('digitalkaoz/*'); //Rs/Issues/Project[]

$issues = $project->getIssues(); //Rs/Issues/Issue[]

Searching

you can either search for an concrete repository like digitalkaoz/issues or search for issues:, (*6)

  • digitalkaoz/* : all repos of digitalkaoz
  • symfony/[Console|Debug]+$ : only symfony/Console or symfony/Debug
  • doctrine/(?!common|lexer)([a-z0-9\.-]+)$ all but doctrine/common and doctrine/lexer

The CLI Application searches by default, in your Code you should use findProjects instead of getProject, (*7)

Console Output, (*8)

Phar

To build a standalone PHAR:, (*9)

$ vendor/bin/box build

now you can use it as standalone app as follows:, (*10)

$ php issues.phar search github digitalkaoz/issues

Tests

$ vendor/bin/phpspec run

The Versions