1 | import * as Github from '@octokit/rest';
|
2 | export interface IRepoDescriptor {
|
3 | name: string;
|
4 | owner: string;
|
5 | repo: string;
|
6 | full_name: string;
|
7 | ssh_url: string;
|
8 | git_url?: string;
|
9 | clone_url?: string;
|
10 | }
|
11 | declare interface IParamsAuth {
|
12 | authToken: string;
|
13 | }
|
14 | declare interface IParamsRepoQuery extends IParamsAuth {
|
15 | repoQuery: string;
|
16 | filter: string;
|
17 | }
|
18 | export declare interface IParamsEditRepo extends IParamsAuth {
|
19 | name: string;
|
20 | owner: string;
|
21 | repo: string;
|
22 | default_branch: string;
|
23 | }
|
24 | export declare interface IParamsAddRepoToTeam extends IParamsAuth {
|
25 | team_id: string;
|
26 | owner: string;
|
27 | repo: string;
|
28 | permission?: 'pull' | 'push';
|
29 | }
|
30 | export declare interface IParamsHeaders {
|
31 | headers: {
|
32 | accepts: string;
|
33 | };
|
34 | }
|
35 | export declare function getAuthenticatedOctokit(params: IParamsAuth): Promise<Github>;
|
36 | export declare function getReposRaw(params: IParamsRepoQuery): Promise<any[]>;
|
37 | export declare function getRepos(options: IParamsRepoQuery): Promise<IRepoDescriptor[]>;
|
38 | export declare function editRepo(params: IParamsEditRepo): Promise<any>;
|
39 | export declare function addRepoToTeam(params: IParamsAddRepoToTeam): Promise<any>;
|
40 | export declare function getTeams(params: IParamsAuth): Promise<Github.OrgsGetTeamsResponseItem[]>;
|
41 | export {};
|