@gitkraken/provider-apis 0.17.0 → 0.17.2
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 +8 -0
- package/dist/fetchWrapper.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +132 -132
- package/dist/providerUtils/gitProvider.d.ts +13 -0
- package/dist/types.d.ts +12 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Account, type GitPullRequest } from '../providers/gitProvider';
|
|
2
|
+
import type { PullRequestBuckets } from '../types';
|
|
3
|
+
export declare const READY_TO_MERGE_BUCKET_ID = "readyToMerge";
|
|
4
|
+
export declare const UNASSIGNED_REVIEWERS_BUCKET_ID = "unassignedReviewers";
|
|
5
|
+
export declare const FAILING_CI_BUCKET_ID = "failingCI";
|
|
6
|
+
export declare const CONFLICTS_BUCKET_ID = "conflicts";
|
|
7
|
+
export declare const NEEDS_MY_REVIEW_BUCKET_ID = "needsMyReview";
|
|
8
|
+
export declare const CHANGES_REQUESTED_BUCKET_ID = "changesRequested";
|
|
9
|
+
export declare const REVIEWER_COMMENTED_BUCKET_ID = "reviewerCommented";
|
|
10
|
+
export declare const WAITING_FOR_REVIEW_BUCKET_ID = "waitingForReview";
|
|
11
|
+
export declare const DRAFT_BUCKET_ID = "draft";
|
|
12
|
+
export declare const OTHER_BUCKET_ID = "other";
|
|
13
|
+
export declare const groupPullRequestsIntoBuckets: (pullRequests: GitPullRequest[], currentUser: Pick<Account, 'id'>) => PullRequestBuckets;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="node-fetch" />
|
|
2
|
+
import { type GitPullRequest } from './providers/gitProvider';
|
|
2
3
|
export type Fetch = typeof import('node-fetch').default;
|
|
3
|
-
export declare const isFetch: (fetch: Fetch | RequestFunction) => fetch is typeof import("node-fetch").default;
|
|
4
|
+
export declare const isFetch: (fetch: Fetch | RequestFunction, forceIsFetch?: boolean) => fetch is typeof import("node-fetch").default;
|
|
4
5
|
export type RequestFunction = <T>(options: RequestOptions) => Promise<Response<T>>;
|
|
5
6
|
export interface Config extends SharedConfig {
|
|
6
7
|
github?: ProviderBaseConfig & EnterpriseConfig;
|
|
@@ -14,6 +15,7 @@ export interface Config extends SharedConfig {
|
|
|
14
15
|
}
|
|
15
16
|
export interface SharedConfig {
|
|
16
17
|
request?: RequestFunction | Fetch;
|
|
18
|
+
forceIsFetch?: boolean;
|
|
17
19
|
}
|
|
18
20
|
export interface ProviderBaseConfig {
|
|
19
21
|
token?: string;
|
|
@@ -78,3 +80,12 @@ export type PagedResult<T> = {
|
|
|
78
80
|
};
|
|
79
81
|
export type FullFieldMap<T> = Record<keyof T, boolean>;
|
|
80
82
|
export type FieldMap<T> = Partial<FullFieldMap<T>>;
|
|
83
|
+
export type PullRequestBucketID = 'readyToMerge' | 'unassignedReviewers' | 'failingCI' | 'conflicts' | 'needsMyReview' | 'changesRequested' | 'reviewerCommented' | 'waitingForReview' | 'draft' | 'other';
|
|
84
|
+
export interface PullRequestBucket {
|
|
85
|
+
id: PullRequestBucketID;
|
|
86
|
+
faIconName: string;
|
|
87
|
+
name: string;
|
|
88
|
+
priority: number;
|
|
89
|
+
pullRequests: GitPullRequest[];
|
|
90
|
+
}
|
|
91
|
+
export type PullRequestBuckets = Record<PullRequestBucketID, PullRequestBucket>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
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",
|