@gitkraken/provider-apis 0.32.0 → 0.33.0
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 +6 -0
- package/dist/index.js +186 -131
- package/dist/index.provider-utils.js +1 -1
- package/dist/index.providers.js +224 -169
- package/dist/providers/gitProvider.d.ts +6 -1
- package/dist/providers/github/github.d.ts +8 -1
- package/dist/types/exportedTypes/gitProvider.d.ts +11 -0
- package/dist/types/internalTypes/github.d.ts +3 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, CreateCommitInput, GetPRForRepoInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitBlame, GitLabel, GitMergeStrategy, GitPullRequest, GitRefWithCommit, GitRepository, Options, PageInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput, User } from '../types/exportedTypes/gitProvider';
|
|
1
|
+
import { Account, AddInlineCommentInput, CreateCommitInput, GetPRForRepoInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitBlame, GitLabel, GitMergeStrategy, GitPullRequest, GitRefWithCommit, GitRepository, Options, PageInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput, User } from '../types/exportedTypes/gitProvider';
|
|
2
2
|
import { PagedResult, Result } from '../types/exportedTypes/types';
|
|
3
3
|
export interface GitProvider {
|
|
4
4
|
getCurrentUser?(input: Record<string, never>, options: Options): Promise<Result<Account>>;
|
|
@@ -86,5 +86,10 @@ export interface GitProvider {
|
|
|
86
86
|
pullRequest: SetPullRequestInput;
|
|
87
87
|
comment: string;
|
|
88
88
|
}, options: Options): Promise<void>;
|
|
89
|
+
addCommentToPullRequest?(input: {
|
|
90
|
+
pullRequest: SetPullRequestInput;
|
|
91
|
+
comment: string;
|
|
92
|
+
}, options: Options): Promise<void>;
|
|
93
|
+
addInlineCommentToPullRequest?(input: AddInlineCommentInput, options: Options): Promise<string | undefined>;
|
|
89
94
|
}
|
|
90
95
|
export declare const MAX_PAGE_SIZE = 100;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, GitTreeItem, NumberedPageInput, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
1
|
+
import { Account, AddInlineCommentInput, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, GitTreeItem, NumberedPageInput, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
2
2
|
import { FetchIssuesData, FetchPullRequestsData, GitHubIssueCloseReason } from '../../types/exportedTypes/github';
|
|
3
3
|
import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
|
|
4
4
|
import { GitProvider } from '../gitProvider';
|
|
@@ -287,6 +287,13 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
287
287
|
pullRequest: SetPullRequestInput;
|
|
288
288
|
comment: string;
|
|
289
289
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
290
|
+
addCommentToPullRequest(input: {
|
|
291
|
+
pullRequest: SetPullRequestInput;
|
|
292
|
+
comment: string;
|
|
293
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
294
|
+
addInlineCommentToPullRequest(input: AddInlineCommentInput, options?: EnterpriseOptions): Promise<string | undefined>;
|
|
295
|
+
private addReplyToReviewThread;
|
|
296
|
+
private createReviewThread;
|
|
290
297
|
setPullRequestMilestone(input: {
|
|
291
298
|
pullRequest: SetPullRequestInput;
|
|
292
299
|
milestone: SetMilestoneInput | null;
|
|
@@ -234,6 +234,9 @@ export interface GitPullRequestReviewComment extends GitComment {
|
|
|
234
234
|
replies: GitComment[];
|
|
235
235
|
isOutdated: boolean;
|
|
236
236
|
isResolved: boolean;
|
|
237
|
+
line: number | null;
|
|
238
|
+
startLine: number | null;
|
|
239
|
+
side: 'LEFT' | 'RIGHT' | null;
|
|
237
240
|
}
|
|
238
241
|
export interface GitPullRequestReview extends GitComment {
|
|
239
242
|
reviewComments: GitPullRequestReviewComment[];
|
|
@@ -295,6 +298,14 @@ export interface SetLabelInput {
|
|
|
295
298
|
graphQLId?: string;
|
|
296
299
|
name: string;
|
|
297
300
|
}
|
|
301
|
+
export interface AddInlineCommentInput {
|
|
302
|
+
pullRequest: SetPullRequestInput;
|
|
303
|
+
comment: string;
|
|
304
|
+
path: string;
|
|
305
|
+
line: number;
|
|
306
|
+
side?: 'LEFT' | 'RIGHT';
|
|
307
|
+
threadId?: string;
|
|
308
|
+
}
|
|
298
309
|
export interface CursorPageInput {
|
|
299
310
|
cursor?: string | null;
|
|
300
311
|
}
|
|
@@ -299,6 +299,9 @@ export interface GraphQLReviewThread {
|
|
|
299
299
|
};
|
|
300
300
|
isOutdated: boolean;
|
|
301
301
|
isResolved: boolean;
|
|
302
|
+
line: number | null;
|
|
303
|
+
startLine: number | null;
|
|
304
|
+
diffSide: 'LEFT' | 'RIGHT' | null;
|
|
302
305
|
originalLine: number | null;
|
|
303
306
|
originalStartLine: number | null;
|
|
304
307
|
startDiffSide: 'LEFT' | 'RIGHT' | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
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",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prettier:ci": "prettier --check src test",
|
|
31
31
|
"test": "yarn test:unit && yarn test:integration",
|
|
32
32
|
"test:unit": "mocha --require ts-node/register 'test/unit/**/*.ts'",
|
|
33
|
-
"test:integration": "mocha --require ts-node/register 'test/integration/**/*.ts'",
|
|
33
|
+
"test:integration": "mocha --require ts-node/register 'test/integration/**/*.ts' --timeout 5000",
|
|
34
34
|
"update-licenses": "node ./scripts/generateLicenses.mjs",
|
|
35
35
|
"watch": "yarn clean && node ./scripts/build.mjs --watch & tsc -w"
|
|
36
36
|
},
|