digitalkaoz / issues
wrapper for github and jira issues
0.5.1
2014-12-10 10:55 UTC
Requires
- php: ~5.4
- chobie/jira-api-restclient: ~1.0
- gentle/bitbucket-api: ~0.6
- igorw/get-in: ~1.0
- knplabs/github-api: ~1.3.0
- m4tthumphrey/php-gitlab-api: ~6.9.1
- symfony/console: ~2.0
Requires (Dev)
- phpspec/phpspec: ~2.0
This package is not auto-updated.
Last update: 2024-12-21 17:50:43 UTC
README
a PHP wrapper for various issue tracker
Installation
$ composer require digitalkaoz/issues
Trackers
currently these are the supported Trackers:
<?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:
$ 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:
<?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:
digitalkaoz/*
: all repos ofdigitalkaoz
symfony/[Console|Debug]+$
: onlysymfony/Console
orsymfony/Debug
doctrine/(?!common|lexer)([a-z0-9\.-]+)$
all butdoctrine/common
anddoctrine/lexer
The CLI Application searches by default, in your Code you should use findProjects
instead of getProject
Phar
To build a standalone PHAR:
$ vendor/bin/box build
now you can use it as standalone app as follows:
$ php issues.phar search github digitalkaoz/issues
Tests
$ vendor/bin/phpspec run