@theholocron/github-client 1.11.2 → 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 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/github-client",
3
- "version": "1.11.2",
3
+ "version": "1.12.0",
4
4
  "description": "A TypeScript client for the GitHub REST API",
5
5
  "keywords": [
6
6
  "github",
@@ -34,7 +34,7 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@theholocron/http-client": "^1.11.2"
37
+ "@theholocron/http-client": "^1.12.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@theholocron/eslint-config": "^7.23.1",