@theholocron/github-client 1.24.0 → 1.26.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 +11 -1
- package/dist/index.mjs +10 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -28,6 +28,8 @@ interface CreateCheckRunInput {
|
|
|
28
28
|
/** Required when `status` is `"completed"`. */
|
|
29
29
|
conclusion?: CheckRunConclusion;
|
|
30
30
|
output?: CheckRunOutput;
|
|
31
|
+
/** URL for the "Details" link on the check run. GitHub defaults to the check suite's own summary page when omitted. */
|
|
32
|
+
details_url?: string;
|
|
31
33
|
}
|
|
32
34
|
interface GitHubCheckRun {
|
|
33
35
|
id: number;
|
|
@@ -187,6 +189,13 @@ interface GitHubPullRequest {
|
|
|
187
189
|
ref: string;
|
|
188
190
|
};
|
|
189
191
|
}
|
|
192
|
+
/** One commit as returned by `GET /pulls/{pull_number}/commits` — only the fields any known consumer needs. */
|
|
193
|
+
interface GitHubPullRequestCommit {
|
|
194
|
+
sha: string;
|
|
195
|
+
commit: {
|
|
196
|
+
message: string;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
190
199
|
//#endregion
|
|
191
200
|
//#region src/repos/repos.d.ts
|
|
192
201
|
interface GitHubRepo {
|
|
@@ -415,6 +424,7 @@ declare function createGitHubClient(opts: GitHubClientOptions): {
|
|
|
415
424
|
};
|
|
416
425
|
pulls: {
|
|
417
426
|
getPullRequest: (repo: string, number: number) => Promise<GitHubPullRequest>;
|
|
427
|
+
listCommits: (repo: string, number: number) => Promise<GitHubPullRequestCommit[]>;
|
|
418
428
|
};
|
|
419
429
|
repos: {
|
|
420
430
|
getRepo: (repo: string) => Promise<GitHubRepo>;
|
|
@@ -457,4 +467,4 @@ declare function createGitHubClient(opts: GitHubClientOptions): {
|
|
|
457
467
|
};
|
|
458
468
|
type GitHubClient = ReturnType<typeof createGitHubClient>;
|
|
459
469
|
//#endregion
|
|
460
|
-
export { type CheckRunConclusion, type CheckRunOutput, type CheckRunStatus, type CodeScanningSetupResult, type CreateCheckRunInput, type CreatePagesPayload, type CreatePullInput, type GitBlob, type GitCommit, type GitContents, type GitHubAppCredentials, type GitHubCheckRun, GitHubClient, type GitHubClientOptions, type GitHubContents, type GitHubEnvironment, type GitHubInstallationWebhookPayload, type GitHubIssue, type GitHubLabel, type GitHubMilestone, type GitHubPages, type GitHubPublicKey, type GitHubPullRequest, type GitHubPullRequestWebhookPayload, type GitHubPushWebhookPayload, type GitHubRepo, type GitHubRuleset, type GitHubUser, type GitHubWebhookHeaders, type GitHubWorkflowRun, type GitPull, type GitRef, type GitTree, type GitTreeItem, type InstallationAccessToken, type IssueSearchParams, type PagesBuildStatus, type PagesBuildType, type SecretScope, type TeamPermission, type UpdatePagesPayload, type WorkflowRunFilter, createAppJWT, createGitHubClient, createInstallationClient, getInstallationAccessToken, parseGitHubWebhookHeaders, verifyGitHubWebhookSignature };
|
|
470
|
+
export { type CheckRunConclusion, type CheckRunOutput, type CheckRunStatus, type CodeScanningSetupResult, type CreateCheckRunInput, type CreatePagesPayload, type CreatePullInput, type GitBlob, type GitCommit, type GitContents, type GitHubAppCredentials, type GitHubCheckRun, GitHubClient, type GitHubClientOptions, type GitHubContents, type GitHubEnvironment, type GitHubInstallationWebhookPayload, type GitHubIssue, type GitHubLabel, type GitHubMilestone, type GitHubPages, type GitHubPublicKey, type GitHubPullRequest, type GitHubPullRequestCommit, type GitHubPullRequestWebhookPayload, type GitHubPushWebhookPayload, type GitHubRepo, type GitHubRuleset, type GitHubUser, type GitHubWebhookHeaders, type GitHubWorkflowRun, type GitPull, type GitRef, type GitTree, type GitTreeItem, type InstallationAccessToken, type IssueSearchParams, type PagesBuildStatus, type PagesBuildType, type SecretScope, type TeamPermission, type UpdatePagesPayload, type WorkflowRunFilter, createAppJWT, createGitHubClient, createInstallationClient, getInstallationAccessToken, parseGitHubWebhookHeaders, verifyGitHubWebhookSignature };
|
package/dist/index.mjs
CHANGED
|
@@ -216,7 +216,16 @@ setProperties: (repo, values) => {
|
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/pulls/pulls.ts
|
|
218
218
|
function pulls(rest) {
|
|
219
|
-
return {
|
|
219
|
+
return {
|
|
220
|
+
getPullRequest: (repo, number) => rest.request(`${repoBase(repo)}/pulls/${number}`),
|
|
221
|
+
/**
|
|
222
|
+
* A PR's own commits, in commit order. `per_page=100` — GitHub's max —
|
|
223
|
+
* covers every real PR in this org; a PR genuinely exceeding 100
|
|
224
|
+
* commits (GitHub caps this endpoint at 250 regardless of pagination)
|
|
225
|
+
* is an edge case no consumer here needs to paginate for today.
|
|
226
|
+
*/
|
|
227
|
+
listCommits: (repo, number) => rest.request(`${repoBase(repo)}/pulls/${number}/commits?per_page=100`)
|
|
228
|
+
};
|
|
220
229
|
}
|
|
221
230
|
//#endregion
|
|
222
231
|
//#region src/repos/repos.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/github-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "A TypeScript client for the GitHub REST API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@theholocron/observability": "^0.3.0",
|
|
36
|
-
"@theholocron/http-client": "^1.
|
|
36
|
+
"@theholocron/http-client": "^1.26.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
40
|
-
"@theholocron/eslint-config": "^8.
|
|
39
|
+
"@theholocron/cli": "5.0.0-alpha.33",
|
|
40
|
+
"@theholocron/eslint-config": "^8.4.3",
|
|
41
41
|
"@theholocron/tsconfig": "^8.2.0",
|
|
42
42
|
"@theholocron/tsdown-config": "^8.2.0",
|
|
43
43
|
"@theholocron/vitest-config": "^8.2.0",
|