seblegall/php-trello-burndown

基于 Trello 的 SCRUM 燃尽图生成器

v0.1.0 2016-06-02 15:07 UTC

This package is not auto-updated.

Last update: 2024-09-23 13:06:13 UTC


README

Twitter GitHub license Build Status Code Coverage Scrutinizer Code Quality

一个基于 Trello API 的 PHP Scrum 燃尽图生成器。

此库可以帮助您根据 Trello 生成故事点燃尽图。

Burndown

需求

  • PHP > 7.0
  • Composer

安装

使用 composer

$ composer require seblegall/php-trello-burndown

用法

// Create a new sprint
$sprint = new \TrelloBurndown\Model\Sprint();
// Set a start date
$sprint->setStart(new \DateTime('2016-05-24'));
// Set a duration
$sprint->setDuration(new \DateInterval('P14D'));

//Create a new Trello Client
$trelloClient = new \TrelloBurndown\Client\TrelloClient('{Your Key}', '{Your Token');

// Create a new generator and pass your client as argument.
$burndownGenerator = new \TrelloBurndown\BurndownGenerator($trelloClient);
/*
 * Add on or more board with the board full name.
 * Pay attention, if the board name is wrong or cannot
 * be find with your Trello client connection, this will do nothing.
 */
$burndownGenerator->addBoard('My Board');
/*
 * Add one or more Todo List with the list full name.
 * If you have add more than one board and some of the boards you've  add
 * contain lists with the same name, you can specify the board name as second parameter.
 * addTodoList('Todo', 'My second Board');
 *
 */
$burndownGenerator->addTodoList('Todo');
/*
 * Add one or more Work In Progress list with the list full name.
 */
$burndownGenerator->addWipList('In Progress');
/*
 * Add one or more Done list with the list full name.
 */
$burndownGenerator->addDoneList('To Validate 1');
$burndownGenerator->addDoneList('To Validate 2');

/*
 * Generate the Story Point Burndown by passing the sprint as agument.
 * This method will return a StoryPointBurndown Object
 */
$burndown = $burndownGenerator->getStoryPointBurndown($sprint);

/*
 * Call the generate() method to get an array representing your burndown
 */
 echo $burndown->generate();

在文档中了解更多关于用法的信息。

与 Trello 一起使用

TrelloBurnown 根据您在每个卡片名称中指示的故事点生成燃尽图。

为了能被燃尽图生成器读取,故事点必须包含在卡片名称中,并用括号包围。

示例

  • (3) 卡片名称 将返回 3
  • (2) 卡片名称 将返回 2
  • (1) 卡片名称 将返回 1
  • (0.5) 卡片名称 将返回 0.5

贡献

请随意发表评论、提交问题或发起拉取请求。

查看 https://github.com/seblegall/php-trello-burndown-dev-env 以运行库并进行工作。

文档

查看更多

许可

php-trello-burndow 采用 MIT 许可证授权 - 有关详细信息,请参阅 LICENSE 文件