@theholocron/holocron-plugin-github 3.34.6 → 3.36.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
@@ -1,5 +1,5 @@
1
1
  import { GitHubClient, GitHubClientOptions, createGitHubClient } from "@theholocron/github-client";
2
- import { Auth, AuthError, Ci, CiRun, CiRunFilter, Environment, Environments, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, PagesConfig, RepoRef, RepoSettings, ResolveTokenInput, Ruleset, SecretScope, Secrets, Source, TeamEntry, TeamEntry as TeamEntry$1, TeamPermission, TrackerDoctorReport, TrackerUser, createFeatureResolver } from "@theholocron/cli";
2
+ import { Auth, AuthError, Ci, CiRun, CiRunFilter, Environment, Environments, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, PagesConfig, PullRequest, RepoRef, RepoSettings, ResolveTokenInput, Ruleset, SecretScope, Secrets, Source, TeamEntry, TeamEntry as TeamEntry$1, TeamPermission, TrackerDoctorReport, TrackerUser, createFeatureResolver } from "@theholocron/cli";
3
3
  //#region src/auth.d.ts
4
4
  declare const resolveReadToken: (input?: ResolveTokenInput) => string;
5
5
  declare const resolveIssuesToken: (input?: ResolveTokenInput) => string;
@@ -164,6 +164,7 @@ declare class GitHubSource implements Source {
164
164
  syncTopics(topics: string[]): Promise<string>;
165
165
  syncDescription(description: string): Promise<string>;
166
166
  syncHomepage(homepage: string): Promise<string>;
167
+ getPullRequest(number: number, repo?: string): Promise<PullRequest>;
167
168
  configurePages(config: PagesConfig, token: string): Promise<void>;
168
169
  }
169
170
  //#endregion
package/dist/index.mjs CHANGED
@@ -602,6 +602,17 @@ var GitHubSource = class {
602
602
  await this.client.repos.updateRepo(this.repo, { homepage });
603
603
  return "homepage updated";
604
604
  }
605
+ async getPullRequest(number, repo) {
606
+ const raw = await this.client.pulls.getPullRequest(repo ?? this.repo, number);
607
+ return {
608
+ number: raw.number,
609
+ title: raw.title,
610
+ state: raw.state,
611
+ merged: raw.merged_at !== null,
612
+ branch: raw.head.ref,
613
+ url: raw.html_url
614
+ };
615
+ }
605
616
  async configurePages(config, token) {
606
617
  const pagesClient = createGitHubClient$1({
607
618
  token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-github",
3
- "version": "3.34.6",
3
+ "version": "3.36.0",
4
4
  "description": "Holocron plugin for GitHub. Implements source, ci, secrets, environments, and issues capabilities against the GitHub REST API.",
5
5
  "keywords": [
6
6
  "ci",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@theholocron/eslint-config": "^7.25.3",
38
- "@theholocron/github-client": "^1.11.2",
38
+ "@theholocron/github-client": "^1.12.0",
39
39
  "@theholocron/tsconfig": "^7.20.0",
40
40
  "@theholocron/tsdown-config": "^7.20.0",
41
41
  "@theholocron/vitest-config": "^7.20.0",
@@ -49,11 +49,11 @@
49
49
  "tsx": "4.23.12",
50
50
  "typescript": "^5.9.3",
51
51
  "vitest": "^4.1.10",
52
- "@theholocron/cli": "3.34.6"
52
+ "@theholocron/cli": "3.36.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@theholocron/github-client": "^1.11.2",
56
- "@theholocron/cli": "3.34.6"
55
+ "@theholocron/github-client": "^1.12.0",
56
+ "@theholocron/cli": "3.36.0"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=22"