@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/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 };