A Dashing widget that displays all currently open merge requests for a GitLab group. Based off of the widget: GitHub Organization Open Pull Requests by dragonai.
The only dependency is gitlab.
Add it to Dashing's Gemfile:
gem 'gitlab'
and run bundle install
.
To use this widget, simply run:
dashing install 11317ce6e6b11163e12d
To add the widget to your dashboard, include the following snippet in the layout file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-view="GitlabMergeRequests" data-id="gitlab-merge-requests"></div>
</li>
Substitute the following placeholders in gitlab_merge_requests.rb with the appropriate values:
my_group_path
: the path of your groupconfig.endpoint
: The API url for your GitLab, only change this if you host your own GitLab.config.private_token
: The API token from your accountpr_widget_data_id
: thedata-id
from the snippet in the layout (the default of gitlab-merge-requests will just work)
The job to update the merge requests is run every minute but you can adjust this as needed.
Hi, is this widget working with the gitlab api v4? I am not getting it to display data, but get no errors. How exactly is the my_group_path syxntax? My group is called core and the project main, should I enter 'core/main' or just 'core' as my group?