1 | import { IExtendedCommit } from "./log-parse";
|
2 | interface ISearchEdge {
|
3 | /** Graphql search node */
|
4 | node: {
|
5 | /** PR number */
|
6 | number: number;
|
7 | /** State of the PR */
|
8 | state: "MERGED" | "CLOSED" | "OPEN";
|
9 | /** Body of the PR */
|
10 | body: string;
|
11 | /** Name of the branch the PR was made from */
|
12 | headRefName: string;
|
13 | /** Use of the fork the PR was made from */
|
14 | headRepositoryOwner: {
|
15 | /** Username of the owner of the fork the PR was made from */
|
16 | login: string;
|
17 | };
|
18 | /** Labels attached to the PR */
|
19 | labels: {
|
20 | /** Edges of the Query */
|
21 | edges: [{
|
22 | /** Graphql search node */
|
23 | node: {
|
24 | /** Name of the label */
|
25 | name: string;
|
26 | };
|
27 | }];
|
28 | };
|
29 | };
|
30 | }
|
31 | export interface ISearchResult {
|
32 | /** Results in the search */
|
33 | edges: ISearchEdge[];
|
34 | }
|
35 | export declare type ISearchQuery = Record<string, ISearchResult>;
|
36 | /**
|
37 | * Generate a GitHub graphql query to find all the commits related
|
38 | * to a PR.
|
39 | */
|
40 | export declare function buildSearchQuery(owner: string, project: string, commits: string[]): string | undefined;
|
41 | /** Use the graphql query result to fill in more information about a commit */
|
42 | export declare function processQueryResult({ owner, sha, result, commitsWithoutPR, prereleaseBranches, }: {
|
43 | /** The owner of the main fork of the repo to automate releases for */
|
44 | owner: string;
|
45 | /** The commit sha to process */
|
46 | sha: string;
|
47 | /** The graphql response for the search query hash */
|
48 | result: ISearchResult;
|
49 | /** Commits that do not yet have a PR matched to them */
|
50 | commitsWithoutPR: IExtendedCommit[];
|
51 | /** Branches to treat as pre-releases */
|
52 | prereleaseBranches: string[];
|
53 | }): IExtendedCommit | undefined;
|
54 | export {};
|
55 | //# sourceMappingURL=match-sha-to-pr.d.ts.map |
\ | No newline at end of file |