@sentry/junior-github 0.301.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 (97) hide show
  1. package/dist/events-CrbJHQ0w.js +2466 -0
  2. package/dist/index.d.ts +71 -3
  3. package/dist/index.js +7294 -7881
  4. package/dist/testing.d.ts +51 -1
  5. package/dist/testing.js +1 -6
  6. package/migrations/0012_pull_request_next_action.sql +5 -0
  7. package/migrations/meta/0012_snapshot.json +434 -0
  8. package/migrations/meta/_journal.json +7 -0
  9. package/package.json +11 -13
  10. package/skills/github-code/SKILL.md +1 -1
  11. package/skills/github-code/SPEC.md +2 -2
  12. package/skills/github-code/references/workflow.md +1 -1
  13. package/dist/account-links.d.ts +0 -8
  14. package/dist/annotations.d.ts +0 -33
  15. package/dist/chunk-YUF5P5I7.js +0 -2507
  16. package/dist/clone-command.d.ts +0 -5
  17. package/dist/configured-repository.d.ts +0 -10
  18. package/dist/conversation-title-context.d.ts +0 -20
  19. package/dist/credential-support.d.ts +0 -107
  20. package/dist/db/database.d.ts +0 -5
  21. package/dist/db/schema.d.ts +0 -1403
  22. package/dist/default-branch.d.ts +0 -15
  23. package/dist/egress-policy.d.ts +0 -25
  24. package/dist/events/comment.d.ts +0 -14
  25. package/dist/events/declarations.d.ts +0 -18
  26. package/dist/events/deployment.d.ts +0 -38
  27. package/dist/events/issue.d.ts +0 -42
  28. package/dist/events/pull-request.d.ts +0 -75
  29. package/dist/events/release.d.ts +0 -42
  30. package/dist/events/repository.d.ts +0 -23
  31. package/dist/events/resource-url.d.ts +0 -5
  32. package/dist/events/scope.d.ts +0 -13
  33. package/dist/git-config.d.ts +0 -52
  34. package/dist/github-status.d.ts +0 -16
  35. package/dist/graphql-documents.d.ts +0 -31
  36. package/dist/images.d.ts +0 -8
  37. package/dist/issue-outcomes/store.d.ts +0 -42
  38. package/dist/merge-conflict-checks/heartbeat.d.ts +0 -27
  39. package/dist/merge-conflict-checks/store.d.ts +0 -44
  40. package/dist/merge-conflict-checks/webhooks.d.ts +0 -23
  41. package/dist/object-facts.d.ts +0 -29
  42. package/dist/permissions.d.ts +0 -6
  43. package/dist/plugin.d.ts +0 -45
  44. package/dist/pull-request-outcomes/apply.d.ts +0 -22
  45. package/dist/pull-request-outcomes/commit-composition.d.ts +0 -6
  46. package/dist/pull-request-outcomes/reconcile.d.ts +0 -41
  47. package/dist/pull-request-outcomes/store.d.ts +0 -115
  48. package/dist/pull-request-requesters/draft-reviewers.d.ts +0 -15
  49. package/dist/pull-request-requesters/store.d.ts +0 -41
  50. package/dist/pull-request-review-policy.d.ts +0 -6
  51. package/dist/receive-pack-policy.d.ts +0 -21
  52. package/dist/reply-markdown.d.ts +0 -18
  53. package/dist/sandbox-paths.d.ts +0 -4
  54. package/dist/tool-support/attribution.d.ts +0 -52
  55. package/dist/tool-support/github-api.d.ts +0 -51
  56. package/dist/tool-support/github-text.d.ts +0 -8
  57. package/dist/tool-support/pull-request-description.d.ts +0 -8
  58. package/dist/tools/clone-repository.d.ts +0 -205
  59. package/dist/tools/comment-on-issue.d.ts +0 -205
  60. package/dist/tools/comment-on-pull-request.d.ts +0 -210
  61. package/dist/tools/create-issue.d.ts +0 -218
  62. package/dist/tools/create-pull-request.d.ts +0 -240
  63. package/dist/tools/footer.d.ts +0 -17
  64. package/dist/tools/get-deployment.d.ts +0 -264
  65. package/dist/tools/get-issue.d.ts +0 -248
  66. package/dist/tools/get-pull-request.d.ts +0 -255
  67. package/dist/tools/get-release.d.ts +0 -243
  68. package/dist/tools/get-repository.d.ts +0 -226
  69. package/dist/tools/get-status.d.ts +0 -213
  70. package/dist/tools/react-to-issue.d.ts +0 -205
  71. package/dist/tools/resolve-pull-request-review-thread.d.ts +0 -206
  72. package/dist/tools/stack-pull-request.d.ts +0 -43
  73. package/dist/tools/submit-pull-request-review.d.ts +0 -216
  74. package/dist/tools/update-issue-comment.d.ts +0 -206
  75. package/dist/tools/update-issue.d.ts +0 -249
  76. package/dist/tools/update-pull-request-feedback.d.ts +0 -242
  77. package/dist/tools/update-pull-request.d.ts +0 -255
  78. package/dist/tools.d.ts +0 -13
  79. package/dist/webhooks/check-suite.d.ts +0 -94
  80. package/dist/webhooks/event-targets.d.ts +0 -44
  81. package/dist/webhooks/events.d.ts +0 -23
  82. package/dist/webhooks/fail-open-log.d.ts +0 -10
  83. package/dist/webhooks/handler.d.ts +0 -55
  84. package/dist/webhooks/installation-requests.d.ts +0 -98
  85. package/dist/webhooks/issue-outcome.d.ts +0 -11
  86. package/dist/webhooks/issue-update.d.ts +0 -8
  87. package/dist/webhooks/merge-conflict.d.ts +0 -48
  88. package/dist/webhooks/ownership.d.ts +0 -14
  89. package/dist/webhooks/pull-request-activity.d.ts +0 -11
  90. package/dist/webhooks/pull-request-match-data.d.ts +0 -31
  91. package/dist/webhooks/pull-request-outcome.d.ts +0 -16
  92. package/dist/webhooks/pull-request-people.d.ts +0 -51
  93. package/dist/webhooks/pull-request-preview.d.ts +0 -12
  94. package/dist/webhooks/pull-request-ready-reviewers.d.ts +0 -25
  95. package/dist/webhooks/pull-request-ready.d.ts +0 -31
  96. package/dist/webhooks/pull-request-review-request.d.ts +0 -32
  97. package/dist/workspace-prepare.d.ts +0 -3
package/dist/index.d.ts CHANGED
@@ -1,3 +1,71 @@
1
- export { githubPlugin, type GitHubPluginOptions } from "./plugin.js";
2
- export type { GitHubPluginExperiments } from "./tools.js";
3
- export type { GitHubAppPermissionLevel } from "./permissions.js";
1
+ import { PluginRegistration } from "@sentry/junior-plugin-api";
2
+ type GitHubAppPermissionLevel = "admin" | "read" | "write";
3
+ type GitHubAppPermissions = Record<string, GitHubAppPermissionLevel>;
4
+ declare const GITHUB_PULL_REQUEST_EVENTS: readonly ["pull_request.checks.failed", "pull_request.checks.passed", "pull_request.checks.recovered", "pull_request.comment.created", "pull_request.opened", "pull_request.ready_for_review", "pull_request.review.approved", "pull_request.review.changes_requested", "pull_request.review.commented", "pull_request.review_comment.created", "pull_request.merged", "pull_request.closed_unmerged", "pull_request.merge_conflict"];
5
+ type GitHubPullRequestEvent = (typeof GITHUB_PULL_REQUEST_EVENTS)[number];
6
+ /** App-configured pull request event behavior. */
7
+ interface GitHubPullRequestEventOptions {
8
+ /** App guidance applied within the matching subscription or event automation instruction. */
9
+ guidance?: Partial<Record<GitHubPullRequestEvent, string>>;
10
+ /**
11
+ * Temporary subscription created after Junior creates a pull request.
12
+ * Defaults to the maintenance Watch below. `false` turns it off.
13
+ */
14
+ subscribeAfterCreate?: GitHubPullRequestSubscriptionConfig | false;
15
+ }
16
+ /** Temporary subscription created after Junior creates a pull request. */
17
+ interface GitHubPullRequestSubscriptionConfig {
18
+ events: GitHubPullRequestEvent[];
19
+ intent: string;
20
+ }
21
+ /** Opt-ins for GitHub plugin behavior that is still being tested. */
22
+ interface GitHubPluginExperiments {
23
+ /**
24
+ * Check pull request descriptions with the decision model before a create
25
+ * or update, and reject ones with check results, a work log, chat talk, or
26
+ * no reason.
27
+ */
28
+ pullRequestDescriptionChecks?: boolean;
29
+ }
30
+ /** Configure the built-in GitHub plugin manifest and hooks. */
31
+ interface GitHubPluginOptions {
32
+ /**
33
+ * Extra OAuth `scope` values to request during GitHub App user authorization.
34
+ *
35
+ * GitHub App user tokens report empty scopes, so Junior treats this as a
36
+ * local reauthorization contract only. Effective access still comes from the
37
+ * app permissions, installation repositories, and requesting user's access.
38
+ */
39
+ additionalUserScopes?: string[];
40
+ /**
41
+ * GitHub App permissions Junior should downscope to read for
42
+ * installation-read tokens.
43
+ *
44
+ * Keys may use GitHub permission names with underscores or hyphens.
45
+ * Installation-write tokens inherit the App installation's complete
46
+ * permission envelope. GitHub remains the source of truth for whether a
47
+ * permission exists.
48
+ */
49
+ appPermissions?: GitHubAppPermissions;
50
+ /** Environment variable containing the GitHub App id. */
51
+ appIdEnv?: string;
52
+ /** Opt-ins for GitHub plugin behavior that is still being tested. */
53
+ experimental?: GitHubPluginExperiments;
54
+ /** Environment variable containing Junior's Git committer email. */
55
+ botEmailEnv?: string;
56
+ /** Environment variable containing Junior's Git committer name. */
57
+ botNameEnv?: string;
58
+ /** Environment variable containing the GitHub App OAuth client id. */
59
+ clientIdEnv?: string;
60
+ /** Environment variable containing the GitHub App OAuth client secret. */
61
+ clientSecretEnv?: string;
62
+ /** Environment variable containing the GitHub App installation id. */
63
+ installationIdEnv?: string;
64
+ /** Environment variable containing the GitHub App private key. */
65
+ privateKeyEnv?: string;
66
+ /** App-configured pull request event behavior. */
67
+ pullRequestEvents?: GitHubPullRequestEventOptions;
68
+ }
69
+ /** Register GitHub runtime hooks for repository workflows. */
70
+ export declare function githubPlugin(options?: GitHubPluginOptions): PluginRegistration;
71
+ export type { GitHubAppPermissionLevel, GitHubPluginExperiments, GitHubPluginOptions };