@sentry/junior-github 0.278.0 → 0.280.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.
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  import type { GitHubDb } from "../db/database.js";
3
3
  declare const githubIssueOutcomeInputSchema: z.ZodObject<{
4
4
  candidateOwned: z.ZodBoolean;
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  import type { GitHubDb } from "../db/database.js";
3
3
  import { type GitHubPullRequestCommitComposition } from "../db/schema.js";
4
4
  declare const githubPullRequestOutcomeInputSchema: z.ZodObject<{
package/dist/testing.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeGitHubEvents
3
- } from "./chunk-IR7D5MR7.js";
3
+ } from "./chunk-NSAVG2P3.js";
4
4
  export {
5
5
  normalizeGitHubEvents
6
6
  };
@@ -0,0 +1,40 @@
1
+ import { type PluginEgress } from "@sentry/junior-plugin-api";
2
+ /** A GitHub API reply with its body parsed as JSON, or as text when it is not JSON. */
3
+ export interface GitHubApiResponse {
4
+ body: unknown;
5
+ ok: boolean;
6
+ status: number;
7
+ }
8
+ /**
9
+ * Send one GitHub API request through host egress.
10
+ *
11
+ * Egress injects credentials, so tools never see a token. `operation` names
12
+ * the provider action for grant selection and diagnostics. Callers own the
13
+ * error mapping, because the status that means bad input differs per route.
14
+ */
15
+ export declare function githubApi(egress: PluginEgress, input: {
16
+ apiVersion?: string;
17
+ body?: unknown;
18
+ method?: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
19
+ operation: string;
20
+ path: string;
21
+ signal?: AbortSignal;
22
+ }): Promise<GitHubApiResponse>;
23
+ /** Return the `/repos/{owner}/{name}` API path prefix for a parsed repo. */
24
+ export declare function repoPath(repo: {
25
+ name: string;
26
+ owner: string;
27
+ }): string;
28
+ /** Parse a model-supplied `owner/name` repository reference. */
29
+ export declare function parseRepo(value: string): {
30
+ name: string;
31
+ owner: string;
32
+ ref: string;
33
+ };
34
+ /**
35
+ * Return a readable error from a GitHub REST or GraphQL error body.
36
+ *
37
+ * REST validation errors list the failed fields in `errors`, and GraphQL puts
38
+ * every message in `errors`. Both details help the model fix its input.
39
+ */
40
+ export declare function githubErrorMessage(body: unknown): string;
@@ -8,7 +8,7 @@
8
8
  * chain of base branches.
9
9
  */
10
10
  import type { ToolRegistrationHookContext } from "@sentry/junior-plugin-api";
11
- import { z } from "zod";
11
+ import * as z from "zod";
12
12
  /** The fields of a created pull request that decide if it is stacked work. */
13
13
  export declare const stackTargetSchema: z.ZodObject<{
14
14
  number: z.ZodNumber;
@@ -1,6 +1,6 @@
1
1
  import type { GitHubStatusIncident } from "../github-status.js";
2
2
  import type { CodeChangePublisher, PluginConversationAnnotations, PluginConversationReviewItems, PluginLogger, PluginRoute, EventPublisher } from "@sentry/junior-plugin-api";
3
- import { z } from "zod";
3
+ import * as z from "zod";
4
4
  import type { GitHubDb } from "../db/database.js";
5
5
  import type { GitHubPullRequestCommitComposition } from "../db/schema.js";
6
6
  import { type GitHubPullRequestRef } from "./merge-conflict.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.278.0",
3
+ "version": "0.280.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,7 +32,7 @@
32
32
  "drizzle-orm": "^0.45.2",
33
33
  "marked": "^18.1.2",
34
34
  "zod": "^4.5.4",
35
- "@sentry/junior-plugin-api": "0.278.0"
35
+ "@sentry/junior-plugin-api": "0.280.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@oxlint/plugins": "1.79.0",