@gitkraken/provider-apis 0.17.2 → 0.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +144 -123
- package/dist/providers/gitProvider.d.ts +6 -1
- package/dist/providers/github/github.d.ts +19 -0
- package/package.json +1 -1
|
@@ -175,7 +175,7 @@ export interface GitPullRequest {
|
|
|
175
175
|
name: string;
|
|
176
176
|
project?: string;
|
|
177
177
|
owner: {
|
|
178
|
-
login
|
|
178
|
+
login: string;
|
|
179
179
|
};
|
|
180
180
|
remoteInfo: {
|
|
181
181
|
cloneUrlHTTPS: string;
|
|
@@ -243,6 +243,10 @@ export interface GetReposInput {
|
|
|
243
243
|
export type GetPRsForReposInput = GetReposInput | {
|
|
244
244
|
repoIds: (string | number)[];
|
|
245
245
|
};
|
|
246
|
+
export type GetPRForRepoInput = {
|
|
247
|
+
repo: GetRepoInput;
|
|
248
|
+
number: number;
|
|
249
|
+
};
|
|
246
250
|
export interface CursorPageInput {
|
|
247
251
|
cursor?: string | null;
|
|
248
252
|
}
|
|
@@ -283,5 +287,6 @@ export interface GitProvider {
|
|
|
283
287
|
path: string;
|
|
284
288
|
}, options: Options): Promise<Result<GitBlame>>;
|
|
285
289
|
getPullRequestsForRepos?(input: GetPRsForReposInput, options: Options): Promise<Result<GitPullRequest[]>>;
|
|
290
|
+
getPullRequestForRepo?(input: GetPRForRepoInput, options: Options): Promise<Result<GitPullRequest | null>>;
|
|
286
291
|
}
|
|
287
292
|
export declare const MAX_PAGE_SIZE = 100;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitProvider, GitPullRequest, GitPullRequestReviewComment, GitRepository, Organization } from '../gitProvider';
|
|
2
3
|
import { Issue } from '../issueProvider';
|
|
3
4
|
import { EnterpriseProvider } from '../provider';
|
|
@@ -152,6 +153,13 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
|
|
|
152
153
|
}[];
|
|
153
154
|
};
|
|
154
155
|
}>;
|
|
156
|
+
getFileContents(input: {
|
|
157
|
+
repo: GetRepoInput;
|
|
158
|
+
path: string;
|
|
159
|
+
ref: string;
|
|
160
|
+
}, options?: EnterpriseOptions): Promise<{
|
|
161
|
+
data: import("buffer").Blob;
|
|
162
|
+
}>;
|
|
155
163
|
searchPullRequests(input: {
|
|
156
164
|
query: string;
|
|
157
165
|
isDraft?: boolean;
|
|
@@ -190,6 +198,17 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
|
|
|
190
198
|
};
|
|
191
199
|
data: GitPullRequest[];
|
|
192
200
|
}>;
|
|
201
|
+
getPullRequestForRepo(input: {
|
|
202
|
+
repo: GetRepoInput;
|
|
203
|
+
number: number;
|
|
204
|
+
}, options?: EnterpriseOptions): Promise<{
|
|
205
|
+
data: GitPullRequest | null;
|
|
206
|
+
}>;
|
|
207
|
+
getPullRequestByGraphQLId(input: {
|
|
208
|
+
graphQLId: string;
|
|
209
|
+
}, options?: EnterpriseOptions): Promise<{
|
|
210
|
+
data: GitPullRequest | null;
|
|
211
|
+
}>;
|
|
193
212
|
closePullRequest(input: {
|
|
194
213
|
pullRequestGraphQLId: string;
|
|
195
214
|
}, options?: EnterpriseOptions): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
4
4
|
"description": "An SDK around different third-party APIs that accepts and returns data in a common format.",
|
|
5
5
|
"author": "Axosoft, LLC dba GitKraken",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|