Skip to main content

Dalec plugin to retrieve gitlab issues, events or milestone

Project description

🦝 dalec-gitlab

Stable Version Code style: black Imports: isort semver

Django Aggregate a Lot of External Content -- Gitlab

Aggregate last gitlab issue or event from a given gitlab instance.

Plugin of 🤖 dalec.

Installation

pip install dalec_gitlab

In django settings INSTALLED_APPS, add:

INSTALLED_APPS = [
    ...
    "dalec",
    "dalec_prime",
    "dalec_gitlab",
    ...
    ]

Usage

General usage: in a template

{% load dalec %}

{% dalec "gitlab" content_type [channel=None] [channel_object=None] [channel_objects=None] [template=None] [ordered_by=None] %}

Real examples

content_type "issue"

  • Available channel: group, project.
  • Available channel_object: group or project id or public_id
  • Available channel_objects: list of group or project id or public_id

Retrieves recent gitlab issues for a project:

{% dalec "gitlab" "issue" channel="project" channel_object="14" %}

Or for multiple projects at once:

{% dalec "gitlab" "issue" channel="project" channel_objects=["14", "42"] %}

content_type "event"

  • Available channel: group, project, user.
  • Available channel_object: group or project id or public_id, or user username
  • Available channel_objects: list of group or project id or public_id, or user username

Retrieves recent gitlab activity for a user:

{% dalec "gitlab" "event" channel="user" channel_object="doctor-who" %}

Retrieves recent gitlab activity for a group:

{% dalec "gitlab" "event" channel="group" channel_object="42" %}

Retrieves recent gitlab activity for a project:

{% dalec "gitlab" "event" channel="project" channel_object="512" %}

content_type "milestone"

  • Available channel: group, project.
  • Available channel_object: group or project id or public_id
  • Available channel_objects: list of group or project id or public_id

Milestone are retrieve by descending updated date.

Retrieves gitlab milestone for a project or group:

{% dalec "gitlab" "milestone" channel="project" channel_object="14" %}

{% dalec "gitlab" "milestone" channel="group" channel_object="42" %}

Settings

Django settings must define:

  • DALEC_GITLAB_BASE_URL : gitlab instance url (ex: https://gitlab.com/)
  • DALEC_GITLAB_API_TOKEN : gitlab api token (ex: azeazeaezdfqsmlkrjzr)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dalec-gitlab-0.1.4.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

dalec_gitlab-0.1.4-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page