org_heigl/captainhook_sendtime
Composer 安装命令:
composer require org_heigl/captainhook_sendtime
包简介
Send the tme from a time-entry in your git commit-message to an API
README 文档
README
A small addition to CaptainHook that will send timing-entries from your commit-messages to an API.
That way you can track your times via your commit-messages.
To use this tool you need to add an entry like the following to your commit-message:
Time: 2h15m
This will send an entry containing 2 hours and 15 minutes to your timetracking-API of choice.
To make sure that all your commit-messages have a time-entry we recommend using the addTime addOn for CaptainHook.
Installation
Install this package using composer
composer require --dev org_heigl/captainhook_sendtime
Usage
To send the time-entry to your API you'll need to configure the hook using the following information:
{
"commit-msg": {
"enabled": true,
"actions": [{
"action": "\\Org_Heigl\\CaptainHook\\Hooks\\Sendime\\SendTimeAction",
"options": {
"account" : "account",
"backendfactory" : "\\Org_Heigl\\CaptainHook\\Hooks\\SendTime\\Backend\\FileFactory",
"_comment" : "Following are parameters that are required by the Backend Factory. For Details see the Backend-Documentation",
"file" : "/tmp/logfile"
}
}]
}
}
This will write the times in a text-file residing in /tmp/logfile. If you want to use a different backend you will
need to add the appropriate files via composer and then configure that backend according to the backends documentation.
Currently there are the following backends supported:
- File
- Tine2.0
If you are missing your backend, feel free to create a factory and a backend that implement the Backend-Interface and the BackendFactory-interface appropriately.
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-26
