@theholocron/github-client 1.33.0 → 1.35.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.
Files changed (2) hide show
  1. package/dist/index.d.mts +23 -0
  2. package/package.json +2 -2
package/dist/index.d.mts CHANGED
@@ -221,12 +221,28 @@ interface GitHubPullRequest {
221
221
  ref: string;
222
222
  };
223
223
  }
224
+ /** A commit's name/email as git itself recorded it — `commit.author`/`commit.committer`, distinct from the GitHub-account `author` below (a commit can carry any email, linked to a GitHub account or not). */
225
+ interface GitHubCommitIdentity {
226
+ name: string;
227
+ email: string;
228
+ }
224
229
  /** One commit as returned by `GET /pulls/{pull_number}/commits` — only the fields any known consumer needs. */
225
230
  interface GitHubPullRequestCommit {
226
231
  sha: string;
227
232
  commit: {
228
233
  message: string;
234
+ author: GitHubCommitIdentity;
235
+ committer: GitHubCommitIdentity;
229
236
  };
237
+ /** The commit's linked GitHub account, when GitHub can associate one — `null` for a commit email with no linked account. `type: "Bot"` identifies an app-authored commit (e.g. Dependabot, a prior Sentinel auto-fix-commit). */
238
+ author: {
239
+ login: string;
240
+ type: "User" | "Bot";
241
+ } | null;
242
+ /** More than one entry marks a merge commit — it has no authorship of its own beyond its parents', the reason DCO enforcement (and this org's own CI) never requires a signoff on one. */
243
+ parents: Array<{
244
+ sha: string;
245
+ }>;
230
246
  }
231
247
  /** One file as returned by `GET /pulls/{pull_number}/files` — only the fields any known consumer needs. */
232
248
  interface GitHubPullRequestFile {
@@ -234,6 +250,13 @@ interface GitHubPullRequestFile {
234
250
  status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
235
251
  /** Set only when `status === "renamed"`. */
236
252
  previous_filename?: string;
253
+ /**
254
+ * This file's unified-diff hunks (`@@ -a,b +c,d @@` headers plus
255
+ * context/added/removed lines) — what a consumer needs to know which
256
+ * RIGHT-side lines a PR review comment can anchor to. Absent for binary
257
+ * files and for diffs too large for GitHub to include.
258
+ */
259
+ patch?: string;
237
260
  }
238
261
  /** One inline comment in a `POST /pulls/{pull_number}/reviews` request body. */
239
262
  interface CreateReviewComment {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/github-client",
3
- "version": "1.33.0",
3
+ "version": "1.35.0",
4
4
  "description": "A TypeScript client for the GitHub REST API",
5
5
  "keywords": [
6
6
  "github",
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@theholocron/observability": "^0.3.0",
36
- "@theholocron/http-client": "^1.33.0"
36
+ "@theholocron/http-client": "^1.35.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@theholocron/cli": "5.0.0-alpha.79",