@sentry/junior-github 0.126.0 → 0.127.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.
- package/dist/{chunk-NNSOXVGR.js → chunk-25NTEYYB.js} +188 -62
- package/dist/index.js +390 -243
- package/dist/resource-events/deployment.d.ts +2 -1
- package/dist/resource-events/issue.d.ts +13 -0
- package/dist/resource-events/pull-request.d.ts +3 -1
- package/dist/resource-events/repository.d.ts +9 -0
- package/dist/testing.js +1 -1
- package/dist/tools/create-issue.d.ts +32 -0
- package/dist/tools/create-pull-request.d.ts +8 -8
- package/dist/tools/get-deployment.d.ts +8 -8
- package/dist/tools/get-pull-request.d.ts +8 -8
- package/dist/tools/get-repository.d.ts +91 -0
- package/dist/tools/update-pull-request.d.ts +8 -8
- package/dist/webhooks/resource-events.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { SubscribableResource } from "@sentry/junior-plugin-api";
|
|
2
2
|
export declare const GITHUB_DEPLOYMENT_EVENTS: readonly ["deployment.created", "deployment.queued", "deployment.pending", "deployment.in_progress", "deployment.succeeded", "deployment.failed", "deployment.error"];
|
|
3
|
+
export declare const GITHUB_DEPLOYMENT_SUGGESTED_EVENTS: string[];
|
|
3
4
|
/** Build the stable deployment-source identity shared by tools and webhooks. */
|
|
4
5
|
export declare function gitHubDeploymentSourceResource(input: {
|
|
5
6
|
commitSha: string;
|
|
6
7
|
environment?: string;
|
|
7
8
|
repo: string;
|
|
8
|
-
}): Pick<SubscribableResource, "label" | "
|
|
9
|
+
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
9
10
|
/** Describe a deployment source when GitHub webhooks are enabled. */
|
|
10
11
|
export declare function gitHubDeploymentSourceSubscribable(input: {
|
|
11
12
|
commitSha: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SubscribableResource } from "@sentry/junior-plugin-api";
|
|
2
|
+
export declare const GITHUB_ISSUE_EVENTS: string[];
|
|
3
|
+
export declare const GITHUB_ISSUE_SUGGESTED_EVENTS: string[];
|
|
4
|
+
/** Build the stable issue identity shared by tools and webhooks. */
|
|
5
|
+
export declare function gitHubIssueResource(input: {
|
|
6
|
+
number: number;
|
|
7
|
+
repo: string;
|
|
8
|
+
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
9
|
+
/** Describe an issue as a resource when webhook subscriptions are enabled. */
|
|
10
|
+
export declare function gitHubIssueSubscribable(input: {
|
|
11
|
+
number: number;
|
|
12
|
+
repo: string;
|
|
13
|
+
}): SubscribableResource | undefined;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { SubscribableResource } from "@sentry/junior-plugin-api";
|
|
2
|
+
export declare const GITHUB_PULL_REQUEST_EVENTS: string[];
|
|
3
|
+
export declare const GITHUB_PULL_REQUEST_SUGGESTED_EVENTS: string[];
|
|
2
4
|
/** Build the stable pull request identity shared by tools and webhooks. */
|
|
3
5
|
export declare function gitHubPullRequestResource(input: {
|
|
4
6
|
number: number;
|
|
5
7
|
repo: string;
|
|
6
|
-
}): Pick<SubscribableResource, "label" | "
|
|
8
|
+
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
7
9
|
/** Describe a pull request as a resource when webhook subscriptions are enabled. */
|
|
8
10
|
export declare function gitHubPullRequestSubscribable(input: {
|
|
9
11
|
number: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SubscribableResource } from "@sentry/junior-plugin-api";
|
|
2
|
+
/** Build the stable repository identity shared by tools and webhooks. */
|
|
3
|
+
export declare function gitHubRepositoryResource(input: {
|
|
4
|
+
repo: string;
|
|
5
|
+
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
6
|
+
/** Describe a repository as a resource when webhook subscriptions are enabled. */
|
|
7
|
+
export declare function gitHubRepositorySubscribable(input: {
|
|
8
|
+
repo: string;
|
|
9
|
+
}): SubscribableResource | undefined;
|
package/dist/testing.js
CHANGED
|
@@ -13,6 +13,14 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
13
13
|
data: {
|
|
14
14
|
number: number;
|
|
15
15
|
url: string;
|
|
16
|
+
subscribable?: {
|
|
17
|
+
identifier: string;
|
|
18
|
+
label: string;
|
|
19
|
+
namespace: string;
|
|
20
|
+
supportedEvents: string[];
|
|
21
|
+
type: string;
|
|
22
|
+
suggestedEvents?: string[] | undefined;
|
|
23
|
+
} | undefined;
|
|
16
24
|
};
|
|
17
25
|
number: number;
|
|
18
26
|
url: string;
|
|
@@ -26,6 +34,14 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
26
34
|
message: string;
|
|
27
35
|
retryable?: boolean | undefined;
|
|
28
36
|
} | undefined;
|
|
37
|
+
subscribable?: {
|
|
38
|
+
identifier: string;
|
|
39
|
+
label: string;
|
|
40
|
+
namespace: string;
|
|
41
|
+
supportedEvents: string[];
|
|
42
|
+
type: string;
|
|
43
|
+
suggestedEvents?: string[] | undefined;
|
|
44
|
+
} | undefined;
|
|
29
45
|
}, {
|
|
30
46
|
[x: string]: unknown;
|
|
31
47
|
ok: true;
|
|
@@ -34,6 +50,14 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
34
50
|
data: {
|
|
35
51
|
number: number;
|
|
36
52
|
url: string;
|
|
53
|
+
subscribable?: {
|
|
54
|
+
identifier: string;
|
|
55
|
+
label: string;
|
|
56
|
+
namespace: string;
|
|
57
|
+
supportedEvents: string[];
|
|
58
|
+
type: string;
|
|
59
|
+
suggestedEvents?: string[] | undefined;
|
|
60
|
+
} | undefined;
|
|
37
61
|
};
|
|
38
62
|
number: number;
|
|
39
63
|
url: string;
|
|
@@ -47,4 +71,12 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
47
71
|
message: string;
|
|
48
72
|
retryable?: boolean | undefined;
|
|
49
73
|
} | undefined;
|
|
74
|
+
subscribable?: {
|
|
75
|
+
identifier: string;
|
|
76
|
+
label: string;
|
|
77
|
+
namespace: string;
|
|
78
|
+
supportedEvents: string[];
|
|
79
|
+
type: string;
|
|
80
|
+
suggestedEvents?: string[] | undefined;
|
|
81
|
+
} | undefined;
|
|
50
82
|
}>;
|
|
@@ -16,9 +16,9 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
16
16
|
number: number;
|
|
17
17
|
url: string;
|
|
18
18
|
subscribable?: {
|
|
19
|
+
identifier: string;
|
|
19
20
|
label: string;
|
|
20
|
-
|
|
21
|
-
resourceRef: string;
|
|
21
|
+
namespace: string;
|
|
22
22
|
supportedEvents: string[];
|
|
23
23
|
type: string;
|
|
24
24
|
suggestedEvents?: string[] | undefined;
|
|
@@ -37,9 +37,9 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
37
37
|
retryable?: boolean | undefined;
|
|
38
38
|
} | undefined;
|
|
39
39
|
subscribable?: {
|
|
40
|
+
identifier: string;
|
|
40
41
|
label: string;
|
|
41
|
-
|
|
42
|
-
resourceRef: string;
|
|
42
|
+
namespace: string;
|
|
43
43
|
supportedEvents: string[];
|
|
44
44
|
type: string;
|
|
45
45
|
suggestedEvents?: string[] | undefined;
|
|
@@ -53,9 +53,9 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
53
53
|
number: number;
|
|
54
54
|
url: string;
|
|
55
55
|
subscribable?: {
|
|
56
|
+
identifier: string;
|
|
56
57
|
label: string;
|
|
57
|
-
|
|
58
|
-
resourceRef: string;
|
|
58
|
+
namespace: string;
|
|
59
59
|
supportedEvents: string[];
|
|
60
60
|
type: string;
|
|
61
61
|
suggestedEvents?: string[] | undefined;
|
|
@@ -74,9 +74,9 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
74
74
|
retryable?: boolean | undefined;
|
|
75
75
|
} | undefined;
|
|
76
76
|
subscribable?: {
|
|
77
|
+
identifier: string;
|
|
77
78
|
label: string;
|
|
78
|
-
|
|
79
|
-
resourceRef: string;
|
|
79
|
+
namespace: string;
|
|
80
80
|
supportedEvents: string[];
|
|
81
81
|
type: string;
|
|
82
82
|
suggestedEvents?: string[] | undefined;
|
|
@@ -53,9 +53,9 @@ export declare function createGitHubGetDeploymentTool(ctx: ToolRegistrationHookC
|
|
|
53
53
|
environment: string | null;
|
|
54
54
|
repo: string;
|
|
55
55
|
subscribable?: {
|
|
56
|
+
identifier: string;
|
|
56
57
|
label: string;
|
|
57
|
-
|
|
58
|
-
resourceRef: string;
|
|
58
|
+
namespace: string;
|
|
59
59
|
supportedEvents: string[];
|
|
60
60
|
type: string;
|
|
61
61
|
suggestedEvents?: string[] | undefined;
|
|
@@ -75,9 +75,9 @@ export declare function createGitHubGetDeploymentTool(ctx: ToolRegistrationHookC
|
|
|
75
75
|
retryable?: boolean | undefined;
|
|
76
76
|
} | undefined;
|
|
77
77
|
subscribable?: {
|
|
78
|
+
identifier: string;
|
|
78
79
|
label: string;
|
|
79
|
-
|
|
80
|
-
resourceRef: string;
|
|
80
|
+
namespace: string;
|
|
81
81
|
supportedEvents: string[];
|
|
82
82
|
type: string;
|
|
83
83
|
suggestedEvents?: string[] | undefined;
|
|
@@ -131,9 +131,9 @@ export declare function createGitHubGetDeploymentTool(ctx: ToolRegistrationHookC
|
|
|
131
131
|
environment: string | null;
|
|
132
132
|
repo: string;
|
|
133
133
|
subscribable?: {
|
|
134
|
+
identifier: string;
|
|
134
135
|
label: string;
|
|
135
|
-
|
|
136
|
-
resourceRef: string;
|
|
136
|
+
namespace: string;
|
|
137
137
|
supportedEvents: string[];
|
|
138
138
|
type: string;
|
|
139
139
|
suggestedEvents?: string[] | undefined;
|
|
@@ -153,9 +153,9 @@ export declare function createGitHubGetDeploymentTool(ctx: ToolRegistrationHookC
|
|
|
153
153
|
retryable?: boolean | undefined;
|
|
154
154
|
} | undefined;
|
|
155
155
|
subscribable?: {
|
|
156
|
+
identifier: string;
|
|
156
157
|
label: string;
|
|
157
|
-
|
|
158
|
-
resourceRef: string;
|
|
158
|
+
namespace: string;
|
|
159
159
|
supportedEvents: string[];
|
|
160
160
|
type: string;
|
|
161
161
|
suggestedEvents?: string[] | undefined;
|
|
@@ -28,9 +28,9 @@ export declare function createGitHubGetPullRequestTool(ctx: ToolRegistrationHook
|
|
|
28
28
|
title: string;
|
|
29
29
|
url: string;
|
|
30
30
|
subscribable?: {
|
|
31
|
+
identifier: string;
|
|
31
32
|
label: string;
|
|
32
|
-
|
|
33
|
-
resourceRef: string;
|
|
33
|
+
namespace: string;
|
|
34
34
|
supportedEvents: string[];
|
|
35
35
|
type: string;
|
|
36
36
|
suggestedEvents?: string[] | undefined;
|
|
@@ -47,9 +47,9 @@ export declare function createGitHubGetPullRequestTool(ctx: ToolRegistrationHook
|
|
|
47
47
|
retryable?: boolean | undefined;
|
|
48
48
|
} | undefined;
|
|
49
49
|
subscribable?: {
|
|
50
|
+
identifier: string;
|
|
50
51
|
label: string;
|
|
51
|
-
|
|
52
|
-
resourceRef: string;
|
|
52
|
+
namespace: string;
|
|
53
53
|
supportedEvents: string[];
|
|
54
54
|
type: string;
|
|
55
55
|
suggestedEvents?: string[] | undefined;
|
|
@@ -79,9 +79,9 @@ export declare function createGitHubGetPullRequestTool(ctx: ToolRegistrationHook
|
|
|
79
79
|
title: string;
|
|
80
80
|
url: string;
|
|
81
81
|
subscribable?: {
|
|
82
|
+
identifier: string;
|
|
82
83
|
label: string;
|
|
83
|
-
|
|
84
|
-
resourceRef: string;
|
|
84
|
+
namespace: string;
|
|
85
85
|
supportedEvents: string[];
|
|
86
86
|
type: string;
|
|
87
87
|
suggestedEvents?: string[] | undefined;
|
|
@@ -98,9 +98,9 @@ export declare function createGitHubGetPullRequestTool(ctx: ToolRegistrationHook
|
|
|
98
98
|
retryable?: boolean | undefined;
|
|
99
99
|
} | undefined;
|
|
100
100
|
subscribable?: {
|
|
101
|
+
identifier: string;
|
|
101
102
|
label: string;
|
|
102
|
-
|
|
103
|
-
resourceRef: string;
|
|
103
|
+
namespace: string;
|
|
104
104
|
supportedEvents: string[];
|
|
105
105
|
type: string;
|
|
106
106
|
suggestedEvents?: string[] | undefined;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type ToolRegistrationHookContext } from "@sentry/junior-plugin-api";
|
|
2
|
+
/** Read one repository and expose its stable subscription identity. */
|
|
3
|
+
export declare function createGitHubGetRepositoryTool(ctx: ToolRegistrationHookContext): import("@sentry/junior-plugin-api").PluginToolDefinition<{
|
|
4
|
+
repo: string;
|
|
5
|
+
}, {
|
|
6
|
+
[x: string]: unknown;
|
|
7
|
+
defaultBranch: string;
|
|
8
|
+
description: string | null;
|
|
9
|
+
fullName: string;
|
|
10
|
+
private: boolean;
|
|
11
|
+
url: string;
|
|
12
|
+
ok: true;
|
|
13
|
+
status: "success";
|
|
14
|
+
target: "getRepository";
|
|
15
|
+
data: {
|
|
16
|
+
defaultBranch: string;
|
|
17
|
+
description: string | null;
|
|
18
|
+
fullName: string;
|
|
19
|
+
private: boolean;
|
|
20
|
+
url: string;
|
|
21
|
+
subscribable?: {
|
|
22
|
+
identifier: string;
|
|
23
|
+
label: string;
|
|
24
|
+
namespace: string;
|
|
25
|
+
supportedEvents: string[];
|
|
26
|
+
type: string;
|
|
27
|
+
suggestedEvents?: string[] | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
};
|
|
30
|
+
truncated?: boolean | undefined;
|
|
31
|
+
continuation?: {
|
|
32
|
+
arguments: Record<string, unknown>;
|
|
33
|
+
reason?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
error?: string | {
|
|
36
|
+
kind: string;
|
|
37
|
+
message: string;
|
|
38
|
+
retryable?: boolean | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
subscribable?: {
|
|
41
|
+
identifier: string;
|
|
42
|
+
label: string;
|
|
43
|
+
namespace: string;
|
|
44
|
+
supportedEvents: string[];
|
|
45
|
+
type: string;
|
|
46
|
+
suggestedEvents?: string[] | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
defaultBranch: string;
|
|
51
|
+
description: string | null;
|
|
52
|
+
fullName: string;
|
|
53
|
+
private: boolean;
|
|
54
|
+
url: string;
|
|
55
|
+
ok: true;
|
|
56
|
+
status: "success";
|
|
57
|
+
target: "getRepository";
|
|
58
|
+
data: {
|
|
59
|
+
defaultBranch: string;
|
|
60
|
+
description: string | null;
|
|
61
|
+
fullName: string;
|
|
62
|
+
private: boolean;
|
|
63
|
+
url: string;
|
|
64
|
+
subscribable?: {
|
|
65
|
+
identifier: string;
|
|
66
|
+
label: string;
|
|
67
|
+
namespace: string;
|
|
68
|
+
supportedEvents: string[];
|
|
69
|
+
type: string;
|
|
70
|
+
suggestedEvents?: string[] | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
};
|
|
73
|
+
truncated?: boolean | undefined;
|
|
74
|
+
continuation?: {
|
|
75
|
+
arguments: Record<string, unknown>;
|
|
76
|
+
reason?: string | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
error?: string | {
|
|
79
|
+
kind: string;
|
|
80
|
+
message: string;
|
|
81
|
+
retryable?: boolean | undefined;
|
|
82
|
+
} | undefined;
|
|
83
|
+
subscribable?: {
|
|
84
|
+
identifier: string;
|
|
85
|
+
label: string;
|
|
86
|
+
namespace: string;
|
|
87
|
+
supportedEvents: string[];
|
|
88
|
+
type: string;
|
|
89
|
+
suggestedEvents?: string[] | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
}>;
|
|
@@ -28,9 +28,9 @@ export declare function createGitHubUpdatePullRequestTool(ctx: ToolRegistrationH
|
|
|
28
28
|
title: string;
|
|
29
29
|
url: string;
|
|
30
30
|
subscribable?: {
|
|
31
|
+
identifier: string;
|
|
31
32
|
label: string;
|
|
32
|
-
|
|
33
|
-
resourceRef: string;
|
|
33
|
+
namespace: string;
|
|
34
34
|
supportedEvents: string[];
|
|
35
35
|
type: string;
|
|
36
36
|
suggestedEvents?: string[] | undefined;
|
|
@@ -47,9 +47,9 @@ export declare function createGitHubUpdatePullRequestTool(ctx: ToolRegistrationH
|
|
|
47
47
|
retryable?: boolean | undefined;
|
|
48
48
|
} | undefined;
|
|
49
49
|
subscribable?: {
|
|
50
|
+
identifier: string;
|
|
50
51
|
label: string;
|
|
51
|
-
|
|
52
|
-
resourceRef: string;
|
|
52
|
+
namespace: string;
|
|
53
53
|
supportedEvents: string[];
|
|
54
54
|
type: string;
|
|
55
55
|
suggestedEvents?: string[] | undefined;
|
|
@@ -75,9 +75,9 @@ export declare function createGitHubUpdatePullRequestTool(ctx: ToolRegistrationH
|
|
|
75
75
|
title: string;
|
|
76
76
|
url: string;
|
|
77
77
|
subscribable?: {
|
|
78
|
+
identifier: string;
|
|
78
79
|
label: string;
|
|
79
|
-
|
|
80
|
-
resourceRef: string;
|
|
80
|
+
namespace: string;
|
|
81
81
|
supportedEvents: string[];
|
|
82
82
|
type: string;
|
|
83
83
|
suggestedEvents?: string[] | undefined;
|
|
@@ -94,9 +94,9 @@ export declare function createGitHubUpdatePullRequestTool(ctx: ToolRegistrationH
|
|
|
94
94
|
retryable?: boolean | undefined;
|
|
95
95
|
} | undefined;
|
|
96
96
|
subscribable?: {
|
|
97
|
+
identifier: string;
|
|
97
98
|
label: string;
|
|
98
|
-
|
|
99
|
-
resourceRef: string;
|
|
99
|
+
namespace: string;
|
|
100
100
|
supportedEvents: string[];
|
|
101
101
|
type: string;
|
|
102
102
|
suggestedEvents?: string[] | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResourceEventInput } from "@sentry/junior-plugin-api";
|
|
2
2
|
/** Normalize one verified GitHub delivery into conversation resource events. */
|
|
3
3
|
export declare function normalizeGitHubResourceEvents(args: {
|
|
4
4
|
body: unknown;
|
|
5
5
|
deliveryId: string;
|
|
6
6
|
eventName: string;
|
|
7
|
-
}):
|
|
7
|
+
}): ResourceEventInput[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.127.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@sinclair/typebox": "^0.34.49",
|
|
32
32
|
"drizzle-orm": "^0.45.2",
|
|
33
33
|
"zod": "^4.4.3",
|
|
34
|
-
"@sentry/junior-plugin-api": "0.
|
|
34
|
+
"@sentry/junior-plugin-api": "0.127.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^25.9.1",
|