Giter VIP home page Giter VIP logo

https-github.com-semmle-lgtm-issue-tracker-example's Introduction

LGTM issue tracker integration example

Code style: black Total alerts

Issue tracking in LGTM Enterprise

LGTM Enterprise gives customers the option of exporting alerts to any issue tracker, by sending webhook POST requests to the external service. Semmle provides an existing full-featured add-on for Atlassian Jira, but other issue trackers need a lightweight application to act as translator for LGTM. This repository provides a basic example of how such an application might be implemented.

Integration with external issue trackers is not available to users of LGTM.com.

This repository

This project gives a quick illustrative example of how to integrate LGTM Enterprise with a third-party issue tracker. This code is intended as a proof-of-concept only, showing the basic operations necessary to handle incoming requests from LGTM. It is not intended for production use. Please feel free to use this as a starting point for your own integration, but if you are using Atlassian Jira see also the LGTM Jira add-on.

We use a lightweight Flask server to handle incoming requests, which in turn writes to the issue tracker of a specified GitHub repository. When not run in debug mode, incoming requests are verified using the secret specified when configuring the integration. For a more detailed explanation please see the associated tutorial.

For instructions on configuring your LGTM Enterprise instance, please see the relevant LGTM help pages.

Integration with the GitHub issue tracker requires an access token for the GitHub installation, with appropriate permissions.

Configuration

When run through pipenv the app pull its configuration from the .env file, for which an example is provided:

FLASK_APP=issues.py
FLASK_DEBUG=0

GIT_REPO_URL=https://github.com/api/v3/repos/USERNAME/REPO/issues
GIT_ACCESS_TOKEN=PERSONAL_ACCESS_TOKEN

LGTM_SECRET=SECRET_AS_SPECIFIED_IN_LGTM_INTEGRATION_PANEL

Running

The easiest way to get the app running is with pipenv. Obviously a proper deployment would require something other than the built-in Flask development server.

Note: This example project requires a minimum of python3.5.

pipenv install
pipenv run flask run

Contributing

We welcome contributions to our example LGTM issue tracker integration. While we intend this project to remain a minimal pedagogical example, if you have an idea how it could be made clearer or more valuable to other users, then please go ahead an open a pull request! Before you do, though, please take the time to read our contributing guidelines.

License

The LGTM issue tracker integration example is licensed under Apache License 2.0 by Semmle.

https-github.com-semmle-lgtm-issue-tracker-example's People

Contributors

nickfyson avatar aibaars avatar mdavidoff0 avatar semmledocs-ac avatar daverlo avatar hentisemmle avatar tibbes 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.