@theholocron/github-client 1.11.1 → 1.12.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/dist/index.d.mts +16 -1
- package/dist/index.mjs +6 -0
- package/package.json +24 -24
package/dist/index.d.mts
CHANGED
|
@@ -144,6 +144,18 @@ interface UpdatePagesPayload {
|
|
|
144
144
|
https_enforced?: boolean;
|
|
145
145
|
}
|
|
146
146
|
//#endregion
|
|
147
|
+
//#region src/pulls/pulls.d.ts
|
|
148
|
+
interface GitHubPullRequest {
|
|
149
|
+
number: number;
|
|
150
|
+
title: string;
|
|
151
|
+
state: "open" | "closed";
|
|
152
|
+
merged_at: string | null;
|
|
153
|
+
html_url: string;
|
|
154
|
+
head: {
|
|
155
|
+
ref: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
147
159
|
//#region src/repos/repos.d.ts
|
|
148
160
|
interface GitHubRepo {
|
|
149
161
|
default_branch: string;
|
|
@@ -271,6 +283,9 @@ declare function createGitHubClient(opts: GitHubClientOptions): {
|
|
|
271
283
|
properties: {
|
|
272
284
|
setProperties: (repo: string, values: Record<string, string>) => Promise<void>;
|
|
273
285
|
};
|
|
286
|
+
pulls: {
|
|
287
|
+
getPullRequest: (repo: string, number: number) => Promise<GitHubPullRequest>;
|
|
288
|
+
};
|
|
274
289
|
repos: {
|
|
275
290
|
getRepo: (repo: string) => Promise<GitHubRepo>;
|
|
276
291
|
updateRepo: (repo: string, settings: Record<string, unknown>) => Promise<void>;
|
|
@@ -312,4 +327,4 @@ declare function createGitHubClient(opts: GitHubClientOptions): {
|
|
|
312
327
|
};
|
|
313
328
|
type GitHubClient = ReturnType<typeof createGitHubClient>;
|
|
314
329
|
//#endregion
|
|
315
|
-
export { type CodeScanningSetupResult, type CreatePagesPayload, type CreatePullInput, type GitBlob, type GitCommit, type GitContents, GitHubClient, type GitHubClientOptions, type GitHubContents, type GitHubEnvironment, type GitHubIssue, type GitHubLabel, type GitHubMilestone, type GitHubPages, type GitHubPublicKey, type GitHubRepo, type GitHubRuleset, type GitHubUser, type GitHubWorkflowRun, type GitPull, type GitRef, type GitTree, type GitTreeItem, type IssueSearchParams, type PagesBuildStatus, type PagesBuildType, type SecretScope, type TeamPermission, type UpdatePagesPayload, type WorkflowRunFilter, createGitHubClient };
|
|
330
|
+
export { type CodeScanningSetupResult, type CreatePagesPayload, type CreatePullInput, type GitBlob, type GitCommit, type GitContents, GitHubClient, type GitHubClientOptions, type GitHubContents, type GitHubEnvironment, type GitHubIssue, type GitHubLabel, type GitHubMilestone, type GitHubPages, type GitHubPublicKey, type GitHubPullRequest, type GitHubRepo, type GitHubRuleset, type GitHubUser, type GitHubWorkflowRun, type GitPull, type GitRef, type GitTree, type GitTreeItem, type IssueSearchParams, type PagesBuildStatus, type PagesBuildType, type SecretScope, type TeamPermission, type UpdatePagesPayload, type WorkflowRunFilter, createGitHubClient };
|
package/dist/index.mjs
CHANGED
|
@@ -194,6 +194,11 @@ function properties(rest) {
|
|
|
194
194
|
} };
|
|
195
195
|
}
|
|
196
196
|
//#endregion
|
|
197
|
+
//#region src/pulls/pulls.ts
|
|
198
|
+
function pulls(rest) {
|
|
199
|
+
return { getPullRequest: (repo, number) => rest.request(`${repoBase(repo)}/pulls/${number}`) };
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
197
202
|
//#region src/repos/repos.ts
|
|
198
203
|
function repos(rest) {
|
|
199
204
|
return {
|
|
@@ -339,6 +344,7 @@ function createGitHubClient(opts) {
|
|
|
339
344
|
labels: labels(rest),
|
|
340
345
|
pages: pages(rest),
|
|
341
346
|
properties: properties(rest),
|
|
347
|
+
pulls: pulls(rest),
|
|
342
348
|
repos: repos(rest),
|
|
343
349
|
rulesets: rulesets(rest),
|
|
344
350
|
secrets: secrets(rest),
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/github-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "A TypeScript client for the GitHub REST API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"github",
|
|
7
|
+
"git",
|
|
8
|
+
"vcs",
|
|
9
|
+
"typescript",
|
|
10
|
+
"http-client",
|
|
11
|
+
"api"
|
|
12
|
+
],
|
|
5
13
|
"homepage": "https://github.com/theholocron/clients/tree/main/packages/github-client#readme",
|
|
6
14
|
"bugs": "https://github.com/theholocron/clients/issues",
|
|
7
15
|
"repository": {
|
|
@@ -11,17 +19,8 @@
|
|
|
11
19
|
},
|
|
12
20
|
"license": "GPL-3.0",
|
|
13
21
|
"author": "Newton Koumantzelis",
|
|
14
|
-
"keywords": [
|
|
15
|
-
"github",
|
|
16
|
-
"git",
|
|
17
|
-
"vcs",
|
|
18
|
-
"typescript",
|
|
19
|
-
"http-client",
|
|
20
|
-
"api"
|
|
21
|
-
],
|
|
22
|
-
"type": "module",
|
|
23
22
|
"sideEffects": false,
|
|
24
|
-
"
|
|
23
|
+
"type": "module",
|
|
25
24
|
"exports": {
|
|
26
25
|
".": {
|
|
27
26
|
"types": "./dist/index.d.mts",
|
|
@@ -29,15 +28,20 @@
|
|
|
29
28
|
"default": "./dist/index.mjs"
|
|
30
29
|
}
|
|
31
30
|
},
|
|
31
|
+
"main": "./dist/index.mjs",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
32
36
|
"dependencies": {
|
|
33
|
-
"@theholocron/http-client": "^1.
|
|
37
|
+
"@theholocron/http-client": "^1.12.0"
|
|
34
38
|
},
|
|
35
39
|
"devDependencies": {
|
|
40
|
+
"@theholocron/eslint-config": "^7.23.1",
|
|
41
|
+
"@theholocron/tsconfig": "^7.20.0",
|
|
42
|
+
"@theholocron/tsdown-config": "^7.20.0",
|
|
43
|
+
"@theholocron/vitest-config": "^7.20.0",
|
|
36
44
|
"@types/node": "^26.2.0",
|
|
37
|
-
"@theholocron/eslint-config": "^7.24.1",
|
|
38
|
-
"@theholocron/tsconfig": "^7.24.1",
|
|
39
|
-
"@theholocron/tsdown-config": "^7.24.1",
|
|
40
|
-
"@theholocron/vitest-config": "^7.24.1",
|
|
41
45
|
"@vitest/coverage-v8": "^4.1.10",
|
|
42
46
|
"@vitest/eslint-plugin": "^1.6.25",
|
|
43
47
|
"eslint": "^10.8.1",
|
|
@@ -48,24 +52,20 @@
|
|
|
48
52
|
"typescript": "^5.9.3",
|
|
49
53
|
"vitest": "^4.1.10"
|
|
50
54
|
},
|
|
51
|
-
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
53
|
-
},
|
|
54
|
-
"files": [
|
|
55
|
-
"dist",
|
|
56
|
-
"README.md"
|
|
57
|
-
],
|
|
58
55
|
"engines": {
|
|
59
56
|
"node": ">=22.0.0"
|
|
60
57
|
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
61
|
"releases": "https://github.com/theholocron/clients/releases",
|
|
62
62
|
"wiki": "https://github.com/theholocron/clients/wiki",
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsdown",
|
|
65
65
|
"lint": "eslint .",
|
|
66
66
|
"test": "vitest run",
|
|
67
|
-
"test:watch": "vitest",
|
|
68
67
|
"test:coverage": "vitest run --coverage",
|
|
68
|
+
"test:watch": "vitest",
|
|
69
69
|
"typecheck": "tsc --noEmit"
|
|
70
70
|
},
|
|
71
71
|
"types": "./dist/index.d.mts"
|