koenhendriks / gitlab-merge-requests
显示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-08-29 05:06:57 UTC
README
此包显示您的GitLab用户资料中的合并请求。
安装
您可以使用composer在Laravel项目中安装此软件包
composer require koenhendriks/gitlab-merge-requests
配置
将以下数据添加到您的.env文件中
GITLAB_API_KEY=xx GITLAB_URL=https://git.company.com/
使用方法
设置配置后,运行以下 artisan 命令
php artisan gitlab:merge-requests
默认情况下,这将获取最近7天内已合并的合并请求。您可以在第一个参数中传递一个整数,以获取更长时间段的合并请求。
获取过去2周的合并请求
php artisan gitlab:merge-requests 14
获取带有特定标签的过去2周的合并请求
php artisan gitlab:merge-requests 14 --labels=feature --labels=bug
使用Laravel提供的-h选项查看所有选项。
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"]