laravel-notification-channels / pivotal-tracker
该软件包已被废弃,不再维护。未建议替代软件包。
Pivotal Tracker Laravel 通知驱动程序
0.0.1
2016-08-28 21:00 UTC
Requires
- php: >=5.6.4
- guzzlehttp/guzzle: ~6.0
- illuminate/events: ^5.3
- illuminate/notifications: ^5.3
- illuminate/support: ^5.3
Requires (Dev)
- mockery/mockery: ^0.9.5
- orchestra/testbench: ^3.3
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2019-09-26 23:42:31 UTC
README
此软件包可以轻松使用 Pivotal Tracker 通过 Laravel 5.3 创建故事。
弃用
此频道已被弃用且不再维护。因此,它将不会更新。如果您想使其复活,请在新的频道仓库中创建一个问题。
内容
安装
您可以通过 composer 安装此软件包
composer require laravel-notification-channels/pivotal-tracker
用法
现在您可以在通知内的 via() 方法中使用此通道
use NotificationChannels\PivotalTracker\PivotalTrackerChannel;
use NotificationChannels\PivotalTracker\PivotalTrackerMessage;
use Illuminate\Notifications\Notification;
class AnApplicationEvent extends Notification
{
public function via($notifiable)
{
return [PivotalTrackerChannel::class];
}
public function toPivotalTracker($notifiable)
{
return (new PivotalTrackerMessage('Something just occurred!'))
->description('This is a test for a notification via Pivotal Tracker.')
->type('bug')
->labels(['a_chore', 'just_a_test']);
}
}
为了使您的通知知道您针对的是哪个 pivotal-tracker 用户和项目,请将 routeNotificationForpivotal-tracker 方法添加到您的 Notifiable 模型中。
此方法需要返回一个包含授权 Pivotal Tracker 用户访问令牌和要添加故事的项目 ID 的数组。
public function routeNotificationForpivotal-tracker()
{
return [
'token' => 'NotifiableToken',
'projectId' => 'Thepivotal-trackerProjectID'
];
}
可用方法
name('')
: 接受一个字符串值作为故事名称。description('')
: 接受一个字符串值作为故事描述。type('')
: 接受一个字符串值作为故事类型(功能|错误|杂项)labels([])
: 接受一个表示故事标签的字符串数组。- 或者您也可以将标签作为参数传递。
变更日志
请参阅 CHANGELOG 了解最近更改的更多信息。
测试
$ composer test
安全
如果您发现任何安全相关的问题,请通过电子邮件 nbourguig@gmail.com 而不是使用问题跟踪器。
贡献
请参阅 CONTRIBUTING 了解详情。
鸣谢
许可证
MIT 许可证 (MIT)。请参阅 许可证文件 了解更多信息。