RFR: SKARA-758: Add /check pull request command

Robin Westberg rwestberg at openjdk.java.net
Tue Nov 24 16:10:52 UTC 2020

On Tue, 24 Nov 2020 15:55:40 GMT, Kartik Ohri <github.com+27751938+amCap1712 at openjdk.org> wrote:

>>> I wanted to test this locally by setting up the skara bots on my own repository but was unable to figure out how to do so due to lack of documentation.
>> Yeah, sorry about that, it has not really been a priority as no-one else actually run them in "production". It can be a bit complicated to configure them properly for running stand-alone, but if you want to run a test against GitHub instead of the mock implementation that's a bit easier. If you want to try that I'll be happy to assist with the required configuration.
> @rwestberg Yes, please. I plan to keep contributing in the future and having such a setup will help me to explore and understand the code much more quickly and in a better way. Hence, I think setting it up will be worth it. Thanks again for the help.

Sure, let's start with the required setup for running tests against GitHub (or GitLab) then! You can pass `-Pcredentials=/path/to/credentials.json` where the file contains something like this:

    "type": "github",
    "host": "https://github.com",
    "project": "rwestberg/skara-integration",
    "namespace": "github.com",
    "apps": [
            "key": "certificates/sbot.private-key.pkcs8.pem",
            "id": "12837",
            "installation": "195957"
            "key": "certificates/sbot2.private-key.pkcs8.pem",
            "id": "18848",
            "installation": "379295"
            "key": "certificates/sbot3.private-key.pkcs8.pem",
            "id": "19394",
            "installation": "397926"

Most tests require two or three different accounts in order to simulate various interactions, so that's why there are a list of them. Each account credential corresponds to a GitHub app that you can create on your account. The `id` can be seen after creating the app, the `installation` value can be found after the app is installed on your account. Finally, the key is the private key you associate with the GitHub app. The path is relative to the .json file. Note that it has to be in PEM format, you'll have to convert the file you get from GitHub.


PR: https://git.openjdk.java.net/skara/pull/954

More information about the skara-dev mailing list