Giter VIP home page Giter VIP logo

klonfisch's Introduction

Klonfisch, the FishEye simulator for GitLab

Implements the Atlassian FishEye API for GitLab, so that you can view GitLab commits in JIRA.

It's better than all the JIRA Git plugins because it displays the commits in a separate "Source" tab instead of adding a comment or activity for each commit.

  • Simulates a part of the FishEye API
  • Works with the JIRA FishEye plugin 5.0.7, 5.0.10 and 7.0.13
  • Shows commits on issues (Tab "Source")
  • Shows commits for projects (Tab "Source")
  • Showing files that got changed in a commit.
  • Project statistics
  • Authentication - everyone can see all commits
  • Activity streams
doc/issue-source.png

JIRA's issue source tab

doc/project-source.png

JIRA's project source tab

Klonfisch is a PHP application that sits between JIRA and GitLab.

GitLab sends commit information to Klonfisch which stores them in a MySQL database. This is done via "web hooks".

JIRA on the other hand talks to Klonfisch, asking for commit information for projects or single issues. Klonfisch searches in the commit database and returns them to JIRA. JIRA then displays the commits in the "Source" tab of issues and projects.

You just have to install the FishEye plugin for JIRA, which takes care of talking to Klonfisch and the commit visualization.

  • PHP 5.3+
  • Apache with mod_rewrite enabled
  • MySQL (or any other database supported by PDO)
  1. git clone the klonfisch git repository
  2. Create a (MySQL) database to store the commits in
  3. Import data/database.sql into that database
  4. Copy data/klonfisch.config.php.dist to data/klonfisch.config.php and adjust it to your environment.
  5. Setup your (apache) webserver by adding a virtual host and pointing its document root to $klonfisch/www/

Klonfisch keeps record of commits to your GitLab instance via web hooks. You can setup them manually in the database, or let Klonfisch create the hooks automatically.

In every GitLab project (repository), you have to do this:

  1. In GitLab project settings, click "Web Hooks"
  2. Add a new Web Hook for commits only, to the URL http://klonfisch.example.org/webhook-call.php

Make a copy of data/gitlab-klonfisch.sql.dist and replace http://klonfisch.example.org with your klonfisch domain.

Then let cron run the following command every hour on the GitLab server:

gitlab-rails dbconsole < gitlab-klonfisch.sql

GitLab will then call /webhook-call.php for each single commit to a repository.

  1. Install the FishEye plugin. Just installation, no configuration
  2. Go to Administration / Applications / Application Links
  3. Click "Add Application Link"
  4. Set the Server URL, e.g. http://klonfisch.gitlab.example.org/
  5. Disable Also create a link from "klonfisch" back to to this server
  6. Finish the application link setup

Hide the review buttons:

  1. Click "Configure FishEye Server" in the application links list
  2. Set "Integration setup" to "FishEye integration only"

That's it. You do not need to setup any authentication. You do not need to setup any project connections.

Now do a commit, mentioning the issue number (e.g. "JGA-11") in the commit message. You will see the commit in JIRA's "Source" tab.

Also see Missing features.

Klonfisch simulates only one git repository, mainly to reduce the number of requests from JIRA. (helpful if you have 700+ repositories, and 200+ repositories for a single JIRA project) This leads to the issue that only the repository "test" is shown for the commits, even though they are from a different repository.

Use the branch link instead (master in $project/$repo).

After removing an application link, you need to disable the FishEye plugin and re-enable it again.

If you fail to do so, you will see errors like

This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

Repository test on http://klonfisch.example.org/ failed: The application link with id '46bc9c7c-0bad-3503-9ddf-0123456789ab' was not found for instance 'FishEyeInstanceImpl...'

Search for commits:

https://klonfisch.example.org/rest-service-fe/changeset-v1/listChangesets/?expand=&rep=test&comment=ABC-1

Klonfisch is licensed under the AGPL v3 or later.

Christian Weiske, Mogic GmbH

Klonfisch is available at https://github.com/mogic-le/klonfisch

klonfisch's People

Contributors

cweiske avatar

Watchers

James Cloos avatar Thomas Funke 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.