Artisan commands
Four commands for operations and debugging. Each takes a provider name (github, gitlab or bitbucket) and uses its configured credential:
php artisan git:repos github # name, path and default branch of every reachable repository
php artisan git:repos github --json # the repositories as JSON
php artisan git:rate-limit github # limit, remaining, used, reset time
php artisan git:commits github acme/api --branch=main --since=2024-01-01
php artisan git:webhook github acme/api # register (URL derived from the route)
php artisan git:webhook github acme/api --url=https://example.com/git/webhooks/github --events=push,pull_request --secret=...
php artisan git:webhook github acme/api --list
php artisan git:webhook github acme/api --delete=12345678- git:repos — the repositories the configured credential can reach (for a GitHub App, its installation’s) as a table, or JSON with --json.
- git:rate-limit — the server-reported limit, remaining, used and reset time.
- git:commits — commits for a repository, filtered by --branch and --since.
- git:webhook — registers the webhook idempotently (URL derived from the route unless --url is given, --events comma-separated, push by default), or --list / --delete=ID.
With a GitHub App installation configured, git:repos lists the installation’s repositories (/installation/repositories) and git:rate-limit reads its quota from that endpoint — an installation token cannot call /user. git:webhook --delete= refuses an id that isn’t in the forge’s shape, and git:commits bitbucket … --since= fails with a message (Bitbucket cannot filter commits by date); both exit 1 without sending a request.
An unknown provider or a provider with no configured credential fails with a clear message and a non-zero exit code.
Show your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.