hws/gitbucketcalendar

1.2 2017-01-11 15:23 UTC

This package is not auto-updated.

Last update: 2024-09-28 22:50:32 UTC


README

允许您在类似GitHub的日历小部件中显示GitHub和BitBucket贡献的库。

安装

代码在Packagist仓库中可用,因此安装只需将其包含在您的依赖项中即可。

"require": {
    "hws/gitbucketcalendar": "1.2.*"
}

之后,您需要运行(最好添加到您的crontab)来自 ./examples/cron.php 的脚本以获取数据。

示例

$repo = new GitBucketCalendar\GitBucketCalendar([
    'bitbucket_key' => '',
    'bitbucket_secret' => '',
    'bitbucket_commit_usernames' => [
        ''
    ],
    'github_account_username' => '',
    'memcached_host' => 'localhost',
    'memcached_port' => 11211
]);

$repo->printContributionsCalendar();

bitbucket_commit_usernames 包含用于计数的所有提交用户名的数组。github_account_username 是GitHub用户名(与配置文件URL中使用的完全一样)。

GitBucket