2.0.2 • Published 7 years ago
tranz-commit-icafe-close v2.0.2
tranz-commit-icafe-close
分析 commit message,修改关联的卡片状态
Usage
const tranz = require('tranz').default
const tranzCommitIcafeClose = require('tranz-commit-icafe-close')
tranz(['feat: 修复 bug #99', 'closed #111 icafe-api-ok-123'].join('\n'), [
tranzCommitIcafeClose({ spaceId: 'icafe-api', username: 'xxx', password: 'yyy' })
]).then(output => {
// 将会修改 icafe-api-111 和 icafe-api-ok-123 卡片的状态
// #99 则不会被处理
})Options
stateName
修改卡片至什么状态。
当类型为 object 时,如
{
stateName: {
'Bug': "已解决",
"任务": "PM待验收",
"$fallback": "进行中"
}
}表示:类型为 Bug 的卡片,状态更改至 "已解决",任务 则更改至 "PM 待验收",$fallback 则表示其他类型的状态
- type:
string|object - default:
'开发中'
debug
打印调试信息
- type:
boolean - default:
false
silent
不 log 任何信息
- type:
boolean - default:
false
注意:以下选项不存在时,将会向上读取 package.json 中的 icafe 字段获取
spaceId
当遇到 #123 卡片缩写时,将会修改卡片 {spaceId}-123 状态
- type:
string - default:
undefined
username
icafe username,详见icafe-api
- type:
string - default:
undefined
password
icafe 虚拟密码,详见icafe-api
- type:
string - default:
undefined
2.0.2
7 years ago