iprior/winnetou

通过 git 提交创建 Jira WorkLog

v1.0.4 2018-11-03 13:53 UTC

This package is not auto-updated.

Last update: 2024-09-29 23:15:45 UTC


README

通过 git 提交创建 Jira WorkLog

俄文文档

+--------+------------+------------+---------------------+---------------------+------------------+----------------------------------------------------------------------------------------+
| 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.                                |
+--------+------------+------------+---------------------+---------------------+------------------+----------------------------------------------------------------------------------------+

配置

<?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 - 工作日开始时间。提交搜索将在这一天进行。请参阅 git 文档
  • pattern - 解析提交的正则表达式。需要根据所需项目前缀更改 PROJECT_PREFIX
  • author-mask - 通过作者过滤提交的掩码。请参阅 git 文档
  • root-dirs - 搜索 git 仓库的目录列表。带有名称 vendor 的目录将被排除
  • jira-host - Jira 主机 URL
  • jira-login - Jira 用户登录名
  • jira-password - Jira 用户密码
  • debug - 如果设置为 TRUE,则信息不会发送到 Jira。

使用

运行命令

php cli.php winnetou <配置路径> [<debug> [<start-work-dt>]]

许可证

MIT 许可证