@sentry/junior-github 0.302.0 → 0.303.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 (93) hide show
  1. package/dist/events-CrbJHQ0w.js +2466 -0
  2. package/dist/index.d.ts +71 -3
  3. package/dist/index.js +7185 -8133
  4. package/dist/testing.d.ts +51 -1
  5. package/dist/testing.js +1 -6
  6. package/package.json +10 -13
  7. package/dist/account-links.d.ts +0 -8
  8. package/dist/annotations.d.ts +0 -33
  9. package/dist/chunk-6SOJ5TN6.js +0 -2618
  10. package/dist/clone-command.d.ts +0 -7
  11. package/dist/configured-repository.d.ts +0 -10
  12. package/dist/conversation-title-context.d.ts +0 -20
  13. package/dist/credential-support.d.ts +0 -107
  14. package/dist/db/database.d.ts +0 -5
  15. package/dist/db/schema.d.ts +0 -1412
  16. package/dist/default-branch.d.ts +0 -15
  17. package/dist/draft-readiness.d.ts +0 -31
  18. package/dist/egress-policy.d.ts +0 -25
  19. package/dist/events/comment.d.ts +0 -14
  20. package/dist/events/declarations.d.ts +0 -18
  21. package/dist/events/deployment.d.ts +0 -38
  22. package/dist/events/issue.d.ts +0 -42
  23. package/dist/events/pull-request.d.ts +0 -75
  24. package/dist/events/release.d.ts +0 -42
  25. package/dist/events/repository.d.ts +0 -23
  26. package/dist/events/resource-url.d.ts +0 -5
  27. package/dist/events/scope.d.ts +0 -13
  28. package/dist/git-config.d.ts +0 -52
  29. package/dist/github-status.d.ts +0 -16
  30. package/dist/graphql-documents.d.ts +0 -44
  31. package/dist/hooks-path-command.d.ts +0 -5
  32. package/dist/images.d.ts +0 -8
  33. package/dist/issue-outcomes/store.d.ts +0 -42
  34. package/dist/merge-conflict-checks/heartbeat.d.ts +0 -31
  35. package/dist/merge-conflict-checks/policy.d.ts +0 -74
  36. package/dist/merge-conflict-checks/store.d.ts +0 -44
  37. package/dist/merge-conflict-checks/webhooks.d.ts +0 -23
  38. package/dist/object-facts.d.ts +0 -29
  39. package/dist/permissions.d.ts +0 -6
  40. package/dist/plugin.d.ts +0 -45
  41. package/dist/pull-request-outcomes/apply.d.ts +0 -22
  42. package/dist/pull-request-outcomes/commit-composition.d.ts +0 -6
  43. package/dist/pull-request-outcomes/reconcile.d.ts +0 -42
  44. package/dist/pull-request-outcomes/store.d.ts +0 -120
  45. package/dist/pull-request-requesters/draft-reviewers.d.ts +0 -15
  46. package/dist/pull-request-requesters/store.d.ts +0 -41
  47. package/dist/pull-request-review-policy.d.ts +0 -6
  48. package/dist/receive-pack-policy.d.ts +0 -21
  49. package/dist/reply-markdown.d.ts +0 -18
  50. package/dist/sandbox-paths.d.ts +0 -4
  51. package/dist/tool-support/attribution.d.ts +0 -52
  52. package/dist/tool-support/github-api.d.ts +0 -51
  53. package/dist/tool-support/github-text.d.ts +0 -8
  54. package/dist/tool-support/pull-request-description.d.ts +0 -8
  55. package/dist/tools/clone-repository.d.ts +0 -287
  56. package/dist/tools/comment-on-issue.d.ts +0 -289
  57. package/dist/tools/comment-on-pull-request.d.ts +0 -294
  58. package/dist/tools/create-issue.d.ts +0 -300
  59. package/dist/tools/create-pull-request.d.ts +0 -322
  60. package/dist/tools/footer.d.ts +0 -17
  61. package/dist/tools/get-deployment.d.ts +0 -346
  62. package/dist/tools/get-issue.d.ts +0 -330
  63. package/dist/tools/get-pull-request.d.ts +0 -358
  64. package/dist/tools/get-release.d.ts +0 -325
  65. package/dist/tools/get-repository.d.ts +0 -308
  66. package/dist/tools/get-status.d.ts +0 -295
  67. package/dist/tools/react-to-issue.d.ts +0 -289
  68. package/dist/tools/resolve-pull-request-review-thread.d.ts +0 -288
  69. package/dist/tools/stack-pull-request.d.ts +0 -43
  70. package/dist/tools/submit-pull-request-review.d.ts +0 -300
  71. package/dist/tools/update-issue-comment.d.ts +0 -290
  72. package/dist/tools/update-issue.d.ts +0 -331
  73. package/dist/tools/update-pull-request-feedback.d.ts +0 -324
  74. package/dist/tools/update-pull-request.d.ts +0 -338
  75. package/dist/tools.d.ts +0 -13
  76. package/dist/webhooks/check-suite.d.ts +0 -121
  77. package/dist/webhooks/event-targets.d.ts +0 -44
  78. package/dist/webhooks/events.d.ts +0 -23
  79. package/dist/webhooks/fail-open-log.d.ts +0 -10
  80. package/dist/webhooks/handler.d.ts +0 -57
  81. package/dist/webhooks/installation-requests.d.ts +0 -105
  82. package/dist/webhooks/issue-outcome.d.ts +0 -11
  83. package/dist/webhooks/issue-update.d.ts +0 -8
  84. package/dist/webhooks/merge-conflict.d.ts +0 -53
  85. package/dist/webhooks/ownership.d.ts +0 -14
  86. package/dist/webhooks/pull-request-action.d.ts +0 -37
  87. package/dist/webhooks/pull-request-activity.d.ts +0 -11
  88. package/dist/webhooks/pull-request-match-data.d.ts +0 -31
  89. package/dist/webhooks/pull-request-outcome.d.ts +0 -16
  90. package/dist/webhooks/pull-request-people.d.ts +0 -51
  91. package/dist/webhooks/pull-request-preview.d.ts +0 -12
  92. package/dist/webhooks/pull-request-ready-reviewers.d.ts +0 -25
  93. package/dist/workspace-prepare.d.ts +0 -3
package/dist/testing.d.ts CHANGED
@@ -1,2 +1,52 @@
1
1
  /** Test-only access to GitHub webhook normalization for runtime eval fixtures. */
2
- export { normalizeGitHubEvents } from "./webhooks/events.js";
2
+ import { EventInput } from "@sentry/junior-plugin-api";
3
+ /** One incident from githubstatus.com. */
4
+ type GitHubStatusIncident = {
5
+ components: string[];
6
+ impact: string;
7
+ name: string;
8
+ resolvedAt?: string;
9
+ startedAt: string;
10
+ status: string;
11
+ url: string;
12
+ };
13
+ type GitHubFailingCheck = {
14
+ checkRunId: number;
15
+ conclusion: string;
16
+ htmlUrl?: string;
17
+ name: string;
18
+ };
19
+ /** Pull request values filled in when a match filter needs them. */
20
+ type GitHubCheckSuitePullRequestFacts = {
21
+ openerEmail?: string;
22
+ openerUsername?: string;
23
+ isDraft?: boolean;
24
+ };
25
+ /** Optional values for one check suite event. */
26
+ type GitHubCheckSuiteFacts = {
27
+ failingChecks?: GitHubFailingCheck[];
28
+ /** Open or recent githubstatus.com incidents when the suite failed. */
29
+ githubIncidents?: GitHubStatusIncident[];
30
+ /**
31
+ * True when this suite passed and every other check suite on its head
32
+ * commit passed too. Set only when something listens for
33
+ * `pull_request.checks.passed`.
34
+ */
35
+ allCheckSuitesPassed?: boolean;
36
+ /** Pull request values by number when a match filter needs them. */
37
+ pullRequestFactsByNumber?: Record<number, GitHubCheckSuitePullRequestFacts>;
38
+ };
39
+ /**
40
+ * Normalize one verified GitHub delivery into conversation events.
41
+ *
42
+ * Comments and reviews written by the configured bot are dropped, so Junior
43
+ * does not react to or act on its own feedback.
44
+ */
45
+ export declare function normalizeGitHubEvents(args: {
46
+ body: unknown;
47
+ botEmail?: string | undefined;
48
+ checkSuiteFacts?: GitHubCheckSuiteFacts;
49
+ deliveryId: string;
50
+ eventName: string;
51
+ }): EventInput[];
52
+ export {};
package/dist/testing.js CHANGED
@@ -1,6 +1 @@
1
- import {
2
- normalizeGitHubEvents
3
- } from "./chunk-6SOJ5TN6.js";
4
- export {
5
- normalizeGitHubEvents
6
- };
1
+ export { n as normalizeGitHubEvents } from "./events-CrbJHQ0w.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.302.0",
3
+ "version": "0.303.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -29,36 +29,33 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@0no-co/graphql.web": "^1.3.4",
32
+ "@sentry/junior-plugin-api": "0.303.0",
32
33
  "@sinclair/typebox": "^0.34.49",
33
34
  "drizzle-orm": "^0.45.4",
34
35
  "ignore": "^7.0.5",
35
36
  "marked": "^18.1.2",
36
- "mdast-util-from-markdown": "^2.0.3",
37
+ "mdast-util-from-markdown": "^2.1.0",
37
38
  "mdast-util-gfm": "^3.1.0",
38
39
  "micromark-extension-gfm": "^3.0.0",
39
40
  "parse5": "^7.3.0",
40
- "zod": "^4.6.7",
41
- "@sentry/junior-plugin-api": "0.302.0"
41
+ "zod": "^4.6.7"
42
42
  },
43
43
  "devDependencies": {
44
- "@oxlint/plugins": "1.79.0",
44
+ "@sentry/junior-testing": "0.0.0",
45
45
  "@types/mdast": "^4.0.4",
46
- "@types/node": "^25.9.1",
46
+ "@types/node": "^24.19.2",
47
47
  "@types/pg": "^8.15.6",
48
48
  "drizzle-kit": "^0.31.8",
49
49
  "graphql": "^16.14.0",
50
50
  "msw": "^2.14.6",
51
- "oxlint": "^1.79.0",
52
51
  "pg": "^8.16.3",
53
- "tsup": "^8.5.1",
54
- "typescript": "^7.0.2",
55
- "vitest": "^4.1.12",
56
- "@sentry/junior-testing": "0.0.0"
52
+ "tsdown": "0.23.7",
53
+ "typescript": "7.0.2",
54
+ "vitest": "^4.1.12"
57
55
  },
58
56
  "scripts": {
59
- "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
57
+ "build": "tsdown",
60
58
  "db:generate": "pnpm exec drizzle-kit generate --config drizzle.config.ts",
61
- "lint": "oxlint --config ../junior/.oxlintrc.json --deny-warnings src tests tsup.config.ts vitest.config.ts",
62
59
  "test": "vitest run",
63
60
  "typecheck": "tsc --noEmit"
64
61
  }
@@ -1,8 +0,0 @@
1
- import type { PluginObjectLinkDefinition } from "@sentry/junior-plugin-api";
2
- /**
3
- * GitHub profile links, such as `https://github.com/octocat`. A login that
4
- * links to a known person shows their Junior person card. Any other login
5
- * shows a GitHub account card. Both come from the link alone, so the card
6
- * needs no GitHub request.
7
- */
8
- export declare const githubAccountLinks: PluginObjectLinkDefinition;
@@ -1,33 +0,0 @@
1
- import { type ConversationAnnotation, type ConversationSidebarAnnotation, type ObjectAnnotation, type PluginAnnotations, type PluginConversationAnnotations, type PluginLogger } from "@sentry/junior-plugin-api";
2
- /** Return GitHub annotations for a conversation row, newest first. */
3
- export declare function githubSidebarAnnotations(annotations: ConversationAnnotation[]): ConversationSidebarAnnotation[];
4
- /** Build the annotation returned by GitHub create and update tools. */
5
- export declare function githubObjectAnnotation(input: {
6
- repo: string;
7
- number: number;
8
- title: string;
9
- url: string;
10
- objectType: "task" | "code_change";
11
- status: string;
12
- facts?: ObjectAnnotation["facts"];
13
- sourceUpdatedAt?: string;
14
- description?: string;
15
- }): ObjectAnnotation;
16
- /** Refresh an existing object's status without selecting a card for delivery. */
17
- declare function updateGitHubAnnotation(store: PluginAnnotations, input: {
18
- repo: string;
19
- number: number;
20
- objectType: "task" | "code_change";
21
- status: "merged" | "closed";
22
- }): Promise<void>;
23
- /**
24
- * Refresh the status of one object in each linked conversation. One failed
25
- * conversation does not stop the others. Each failure is logged.
26
- */
27
- export declare function updateGitHubAnnotations(args: {
28
- annotations: PluginConversationAnnotations;
29
- conversationIds: string[];
30
- log?: Pick<PluginLogger, "error">;
31
- update: Parameters<typeof updateGitHubAnnotation>[1];
32
- }): Promise<void>;
33
- export {};