murdercode / nova4-bitbucket-news-commits
This package is abandoned and no longer maintained.
No replacement package was suggested.
A Laravel Nova card.
v0.0.2
2022-09-23 09:45 UTC
Requires
- php: ^7.3|^8.0
This package is auto-updated.
Last update: 2023-08-23 11:35:44 UTC
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!