koenhendriks / gitlab-merge-requests
Display merge requests from a user from Gitlab.
1.1.1
2019-07-01 07:38 UTC
Requires
- php: ^7.1.3
- guzzlehttp/guzzle: ^6.3
- illuminate/support: ~5.8.0
- nesbot/carbon: ^2.19
Requires (Dev)
- orchestra/testbench: ~3.8.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-05-29 04:09:45 UTC
README
This package shows the merge requests from your GitLab user profile.
Installation
You can install this using composer in your Laravel project:
composer require koenhendriks/gitlab-merge-requests
Config
Add the following data to your .env
file:
GITLAB_API_KEY=xx GITLAB_URL=https://git.company.com/
Usage
Run the following artisan command after setting up the configuration:
php artisan gitlab:merge-requests
By default this will get the merge requests that have been merged in the last 7 days. You can pass in a integer in the first argument to get merge requests from a longer period of time.
Get MR's from last 2 weeks:
php artisan gitlab:merge-requests 14
Get MR's from last 2 weeks with specific labels:
php artisan gitlab:merge-requests 14 --labels=feature --labels=bug
For all options use the -h
option provided by Laravel.
php artisan gitlab-merge-requests -h
Options: --wip[=WIP] Filter merge requests against their wip status. 'yes' to return only WIP merge requests, no to return non WIP merge requests [default: "no"] --state[=STATE] Return all merge requests or just those that are opened, 'closed', 'locked', or 'merged [default: "merged"] --order_by[=ORDER_BY] Return requests ordered by 'created_at' or 'updated_at' fields. [default: "created_at"] --sort[=SORT] Return requests sorted in 'asc' or 'desc' order. [default: "desc"] --labels[=LABELS] Return merge requests matching labels. 'None' lists all merge requests with no labels. 'Any' lists all merge requests with at least one label. Predefined names are case-insensitive. (multiple values allowed) --scope[=SCOPE] Return merge requests for the given scope: 'created_by_me', 'assigned_to_me' or 'all'. [default: "all"] --milestone[=MILESTONE] Return merge requests for a specific milestone. 'None' returns merge requests with no milestone. 'Any' returns merge requests that have an assigned milestone. [default: "any"]