iprior / winnetou
Create Jira WorkLog by git commits
v1.0.4
2018-11-03 13:53 UTC
Requires
- php: 7.2.*
- lesstif/php-jira-rest-client: 1.9.*
- symfony/console: 4.1.*
Requires (Dev)
- php-coveralls/php-coveralls: 2.1.*
- phpunit/phpunit: 7.4.*
This package is not auto-updated.
Last update: 2025-03-31 01:37:33 UTC
README
Create Jira WorkLog by git commits
Branch | Travis-CI | Coveralls |
---|---|---|
master | ||
v1 |
+--------+------------+------------+---------------------+---------------------+------------------+----------------------------------------------------------------------------------------+
| Status | WorkLog ID | Issue | Start DateTime | End DateTime | Work time (sec.) | Description |
+--------+------------+------------+---------------------+---------------------+------------------+----------------------------------------------------------------------------------------+
| OK | DEBUG | POJEC-1234 | 2018-10-11 10:00:00 | 2018-10-11 11:57:20 | 7040 | Comment text. Comment text. Comment text. Comment.text. |
| OK | DEBUG | POJEC-1235 | 2018-10-11 11:57:20 | 2018-10-11 12:03:27 | 367 | Comment text. Comment text. Comment text. Comment.text. |
| OK | DEBUG | POJEC-1236 | 2018-10-11 12:03:27 | 2018-10-11 13:51:44 | 6497 | Comment text. Comment text. Comment text. Comment.text. Comment text. |
| OK | DEBUG | POJEC-1237 | 2018-10-11 13:51:44 | 2018-10-11 14:42:13 | 3029 | Comment text. Comment text. Comment text. Comment.text. Comment text. Comment text. |
| OK | DEBUG | POJEC-1238 | 2018-10-11 14:42:13 | 2018-10-11 17:55:27 | 11594 | Comment text. Comment text. Comment text. Comment.text. |
+--------+------------+------------+---------------------+---------------------+------------------+----------------------------------------------------------------------------------------+
Configure
<?php return [ 'start-work-day-dt' => (new \DateTime('now', new \DateTimeZone('Europe/Moscow')))->setTime(10, 0, 0), 'pattern' => '/commit (?<hash>.*)\n.*\nDate:(?<dt>.*)\n\n.*(?<issue>PROJECT_PREFIX-\d{1,}) (?<comment>.*)\n/mu', 'author-mask' => 'author@', 'root-dirs' => [ '/path/to/folder/with/repositories1', '/path/to/folder/with/repositories2', ], 'jira-host' => 'http://jira.host.com', 'jira-login' => 'jiraLogin', 'jira-password' => 'jiraPassword', 'debug' => true, ];
- start-work-day-dt - working day start time. Search of commits will on this day. See git documentation
- pattern - regexp for parsing commits. Need change
PROJECT_PREFIX
on required project prefix.. - author-mask - mask for filtering commits by author. See git documentation
- root-dirs - list of directories for searches git repositories. Directories named
vendor
are excluded - jira-host - URL Jira host
- jira-login - Jira user login
- jira-password - Jira user password
- debug - if set
TRUE
, information don't send to Jira.
Used
Run command:
php cli.php winnetou <config-path> [<debug> [<start-work-dt>]]
License
MIT License