murdercode/nova4-bitbucket-news-commits
最新稳定版本:v0.0.2
Composer 安装命令:
composer require murdercode/nova4-bitbucket-news-commits
包简介
A Laravel Nova card.
README 文档
README
This card allows you to display the latest commits from your Bitbucket repository in Laravel Nova.
How to start
First you need to install the package through composer:
composer require murdercode/nova4-bitbucket-news-commits
Then you need to add the following code in config/services.php:
'nova4-bitbucket-news-commits' => [ 'folder' => env('NOVA_BITBUCKET_FOLDER', ''), 'username' => env('NOVA_BITBUCKET_USERNAME', ''), 'password' => env('NOVA_BITBUCKET_PASSWORD', ''), 'repository' => env('NOVA_BITBUCKET_REPOSITORY', ''), ],
Now you can fill your .env file with the following variables:
NOVA_BITBUCKET_FOLDER=<your-bitbucket-folder> NOVA_BITBUCKET_USERNAME=<your-bitbucket-username> NOVA_BITBUCKET_PASSWORD=<your-bitbucket-password> NOVA_BITBUCKET_REPOSITORY=<your-bitbucket-repository>
How to use
Register your card in the dashboard or whatever you want.:
use Murdercode\Nova4BitbucketNewsCommits\Nova4BitbucketNewsCommits; //... class Main extends Dashboard { public function cards() { return [ //new Help, (new Nova4BitbucketNewsCommits())->commits()->limit(10), // <-THIS LINE ]; } }
You can also override the repository where you want to get the commits from:
use Murdercode\Nova4BitbucketNewsCommits\Nova4BitbucketNewsCommits; //... class Main extends Dashboard { public function cards() { return [ (new Nova4BitbucketNewsCommits())->commits('my-custom-repo')->limit(20) ]; } }
This tool uses your CACHE_DRIVER defined in .env to cache the data.
If you haven't defined it, you can reach your API limits.
TODO
- Add a cache configuration
- Add localization
- Add a modal to show details of the commit
- and more!
This project is under development. Feel free to contribute!
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-01