1 | /**
|
2 | * @license
|
3 | * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
|
4 | * This code may only be used under the BSD style license found at
|
5 | * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
6 | * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
7 | * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
8 | * Google as part of the polymer project is also subject to an additional IP
|
9 | * rights grant found at http://polymer.github.io/PATENTS.txt
|
10 | */
|
11 | /**
|
12 | * Configuration data needed to create a GitHub Check.
|
13 | *
|
14 | * GitHub Checks are attached to a particular commit in a particular repo, and
|
15 | * are created by GitHub Apps, which are installed into an org or repo.
|
16 | *
|
17 | * More info at https://developer.github.com/v3/apps/
|
18 | *
|
19 | * Note that we do not currently manage a generally-accessible GitHub App. We
|
20 | * only support a fully self-service integration, whereby users are expected to
|
21 | * create their own GitHub App, install it to their repos, grant full power to
|
22 | * this binary to act as that App via a private key, and then piggyback on e.g.
|
23 | * Travis CI to actually run the benchmarks. This avoids the need to run any
|
24 | * services for the time being, but still lets us have our own standalone Check
|
25 | * tab in the GitHub UI.
|
26 | */
|
27 | export interface CheckConfig {
|
28 | label: string;
|
29 | appId: number;
|
30 | installationId: number;
|
31 | repo: string;
|
32 | commit: string;
|
33 | }
|
34 | /**
|
35 | * Parse the --github-check flag.
|
36 | */
|
37 | export declare function parseGithubCheckFlag(flag: string): CheckConfig;
|
38 | /**
|
39 | * Create a pending GitHub check object and return a function that will mark
|
40 | * the check completed with the given markdown.
|
41 | */
|
42 | export declare function createCheck(config: CheckConfig): Promise<(markdown: string) => void>;
|