Giter Club home page Giter Club logo

lkml-gerrit-bridge's Introduction

LKML Gerrit Bridge

The LKML Gerrit Bridge attempts to provide a mechanism for getting changes and reviews posted on LKML into Gerrit. The long term goal is to provide a bidirectional bridge which allows a single review to be done in both LKML and Gerrit. However, since the most difficult (and most useful) aspect of this problem is to make LKML reviews visible in Gerrit we are starting there.

NOTE: This project is highly experimental and was mostly hacked together by one programmer in his spare time as a hobby, so the code quality is not super great. Sorry.

What can the LKML Gerrit Bridge do now?

Right now, the Bridge will clone and periodically pull from the https://lore.kernel.org/linux-kselftest/ git archives and push comments and new patches to this Gerrit instance.

How do I set LKML Gerrit Bridge up?

You need to set up Gerrit cookies.

To set up a server which uploads emails sent to the kselftest email list, you also need to build a docker image.

Setting up Gerrit cookies

First you need to get Gerrit to generate an API cookie; you can do this by:

Then you need to copy the cookies that were added to a file called gerritcookies in this directory.

NOTE: YOU MUST ADD A COMMENT TO THE TOP OF THE COOKIE FILE: # HTTP Cookie File

Setting up Google Cloud credentials

First you need to generate the gcloud credentials file. In order to do that, you have to:

Then you need to copy the credentials file that was added to a file called credentials.json in this directory.

Setting up Database information

Create a file named .env under src/ that includes all of the following:

HOST = [HOST_NAME]
USER = [USER_NAME]
PASSWORD = [PASSWORD]
DB = [NAME_OF_DATABASE]

NOTE: The name of the database does not have to be an existing database.

Building a docker image

First, make sure that you have Docker installed on the device which is building the image. Before building, there are a couple of folders that should be removed if you have run the server locally. Please run the following command before building to ensure the image size isn't too large.

rm -rf linux_kselftest/ src/gerrit_git_dir/ src/index_files/

After ensuring these folders are deleted, you can build the image by running the following command in the lkml-gerrit-bridge directory:

docker build -t myimage .

After running the build command, you will have created an image with the tag 'myimage'.

Running LKML Gerrit Bridge locally

NOTE: You might not be able to actually push new changes to the Gerrit instace unless your Git user.name has been granted the "Forge Committer" permission.

python3 src/main.py

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.