Coder Social home page Coder Social logo

bbodenmiller / mattermost-plugin-gitlab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattermost/mattermost-plugin-gitlab

0.0 1.0 0.0 11.74 MB

GitLab plugin for Mattermost

License: Apache License 2.0

Makefile 3.43% Go 83.76% JavaScript 12.81%

mattermost-plugin-gitlab's Introduction

Mattermost GitLab Plugin

Build Status Code Coverage

Maintainer: @iomodo Co-Maintainer: @hanzei

A GitLab plugin for Mattermost.

Originally developed by Romain Maneschi.

GitLab Plugin screenshot

Features

  • Daily reminders - the first time you log in to Mattermost each day, get a post letting you know what issues and merge requests need your attention
  • Notifications - get a direct message in Mattermost when someone mentions you, requests your review, comments on or modifies one of your merge requests/issues, or assigns you on GitLab
  • Sidebar buttons - stay up-to-date with how many reviews, unread messages, assignments and open merge requests you have with buttons in the Mattermost sidebar
  • Slash commands - interact with the GitLab plugin using the /gitlab slash command
    • Subscribe to a respository - Use /gitlab subscribe to subscribe a Mattermost channel to receive posts for new merge requests and/or issues in a GitLab repository
    • Get to do items - Use /gitlab todo to get an ephemeral message with items to do in GitLab
    • Update settings - Use /gitlab settings to update your settings for the plugin
    • And more! - Run /gitlab help to see what else the slash command can do
  • Supports GitLab On Premise - Works with SaaS and On Premise versions of GitLab

Installation

In Mattermost 5.16 and later, the GitLab plugin is included in the Plugin Marketplace which can be accessed from Main Menu > Plugins Marketplace. You can install the GitLab plugin and then configure it via the Plugin Marketplace "Configure" button.

In Mattermost 5.13 and earlier, follow these steps:

  1. Go to https://github.com/mattermost/mattermost-plugin-gitlab/releases to download the latest release file in zip or tar.gz format.
  2. Upload the file through System Console > Plugins > Management, or manually upload it to the Mattermost server under plugin directory. See documentation for more details.

See Compatibility for supported versions.

Configuration

Step 1: Register an OAuth application in GitLab

  1. Go to https://gitlab.com/profile/applications or https://gitlab.yourdomain.com/profile/applications to register an OAuth app.
  2. Set the following values:
    • Name: Mattermost GitLab Plugin - <your company name>
    • Redirect URI: https://your-mattermost-url.com/plugins/com.github.manland.mattermost-plugin-gitlab/oauth/complete, replacing https://your-mattermost-url.com with your Mattermost URL
  3. Select api and read_user in Scopes
  4. Save the application. Copy the *Application ID and Secret fields in the resulting screen.
  5. In Mattermost, go to Plugins Marketplace > GitLab > Configure, and enter the GitLab URL, GitLab OAuth Client ID, and Gitlab OAuth Client Secret

Step 2: Configure plugin in Mattermost

  1. Go to System Console > Plugins > GitLab and do the following:
  • Generate a new value for Webhook Secret. Copy it as you will use it in a later step.
  • Generate a new value for At Rest Encryption Key.
  • (Optional) GitLab Group: Lock the plugin to a single GitLab group by setting this field to the name of your GitLab group.
  • (Optional) Enable Private Repositories: Allow the plugin to receive notifications from private repositories by setting this value to true. When enabled, existing users must reconnect their accounts to gain access to private project. Affected users will be notified by the plugin once private repositories are enabled.
  1. Hit Save.
  2. Go to Plugins Marketplace > GitLab > Configure > Enable Plugin and click Enable to enable the GitLab plugin.

Step 3: Create a GitLab webhook

Note for each project you want to receive notifications for or subscribe to, you must create a webhook

  1. In GitLab, go to the project you want to subscribe to, select Settings then Integrations in the sidebar.
  2. Set the following values:
    • URL: https://your-mattermost-url.com/plugins/com.github.manland.mattermost-plugin-gitlab/webhook, replacing https://your-mattermost-url.com with your Mattermost URL
    • Secret Token: the webhook secret you copied previously
  3. Select all the events in Triggers.
  4. Add the webhook.

You're all set! To test it, run the /gitlab connect slash command to connect your Mattermost account with GitLab.

Compatibility

Mattermost-Plugin-Gitlab Mattermost GitLab
0.3.0 5.10+ 11.2+
0.2.0 5.8+ 11.2+
0.1.0 5.8+ 11.2+

Developing

This plugin contains both a server and web app portion.

Use make dist to build distributions of the plugin that you can upload to a Mattermost server.

Use make check-style to check the style.

Use make deploy to deploy the plugin to your local server. Before running make deploy you need to set a few environment variables:

export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password

Inspiration

This project is a fork of the mattermost-plugin-github. Thanks to all contributors of it.

Feedback and Feature Requests

Feel free to create a GitHub issue or join the GitLab Plugin channel on our community Mattermost instance to discuss.

mattermost-plugin-gitlab's People

Contributors

manland avatar hanzei avatar mickmister avatar jasonblais avatar crspeller avatar dependabot[bot] avatar jfrerich avatar levb avatar jwilander avatar asaadmahmood avatar ashishbhate avatar ericjaystevens avatar kop avatar jsmestad avatar icelander avatar theo-o avatar larkox avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.