krunner-gitlab

command module
v0.0.0-...-d5e17eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

KRunner GitLab backend

This is a fork of the krunner-gitlab plugin of my friend Stephan Hochdörfer.

This package provides a KRunner backend which will use a GitLab instance as a search backend. Currently only project names are searched for, this might change in the future.

Maintenance Badge
Go Report Card Go Github Action Workflow

20230225102929.png

Installation

Clone this repository

git clone https://github.com/cmuench/krunner-gitlab

Build the go application

# only the go application
go install

# build the application and install all icons etc. on your local machine
./install.sh

Register the runner in KDE by storing a file called krunner-gitlab.desktop in $HOME/.local/share/kservices5 and then restart the rkunner process.

See: krunner-gitlab.desktop

To configure krunner-gitlab with the url and the access token for your own GitLab instance, create a file ~/.config/krunner-gitlab/config.yaml like this:

url: https://your-gitlab-server/api/v4
token: your-token
items_to_show: 10
query_min_length: 4
query_prefix: gitlab

It is important to note that the url needs to point to the GitLab API url!

Run the application

Run krunner-gitlab in your go/bin directory. Invoke KRunner and start searching for GitLab projects.

Use in krunner

Type the query-prefix (standard is gitlab).

  • Search projects: gitlab p <query string>
  • Search groups: gitlab g <query string>

systemd Integration

Add a user service in your home directory.

Example file: ~/.config/systemd/user/krunner-gitlab.service

Check that the krunner-gitlab binary exists in your ~/go/bin directory. Change path if the binary was installed in another location.

[Unit]
Description=krunner Gitlab Service
ConditionPathExists=%h/.config/krunner-gitlab/config.yaml
After=default.target

[Service]
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=%h/go/bin/krunner-gitlab
SyslogIdentifier=krunner-gitlab

[Install]
WantedBy=default.target

Activate the user service with:

systemctl --user daemon-reload
systemctl --user enable krunner-gitlab.service
systemctl --user start krunner-gitlab.service

License

KRunner GitLab is released under the Apache 2.0 license.

Gitlab Icon from https://icon-icons.com/icon/gitlab-original-logo/146503

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL