@sentry/junior-linear 0.189.0 → 0.191.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/README.md CHANGED
@@ -27,7 +27,7 @@ To run watches or event tasks when Linear issues are created:
27
27
  2. Create a Linear webhook for the `Issue` resource at `https://<junior-host>/api/webhooks/linear`.
28
28
  3. Redeploy Junior.
29
29
 
30
- The plugin verifies the `Linear-Signature` header and publishes `issue.created` for the issue identifier and the team key. Team event tasks use the Linear team key, such as `SRE`.
30
+ The plugin verifies the `Linear-Signature` header and publishes `issue.created` for the issue identifier and the team key. Team event tasks use the Linear team key, such as `SRE`. Issue and team watches also accept an optional `match.teamKey` filter on trusted event data.
31
31
 
32
32
  Optional: set channel defaults when a Slack thread usually routes work to the same Linear destination:
33
33
 
package/dist/index.js CHANGED
@@ -5,7 +5,16 @@ import {
5
5
  import { z as z2 } from "zod";
6
6
 
7
7
  // src/resource-events/issue.ts
8
+ import {
9
+ resourceEventMatchFieldsSchema
10
+ } from "@sentry/junior-plugin-api";
8
11
  var LINEAR_ISSUE_EVENTS = ["issue.created"];
12
+ var LINEAR_ISSUE_MATCH_FIELDS = resourceEventMatchFieldsSchema.parse({
13
+ teamKey: {
14
+ kind: "string",
15
+ description: "Linear team key for the issue, such as SRE"
16
+ }
17
+ });
9
18
  function linearIssueResource(input) {
10
19
  const identifier = input.identifier.toUpperCase();
11
20
  return {
@@ -191,12 +200,14 @@ function linearPlugin() {
191
200
  {
192
201
  type: "issue",
193
202
  supportedEvents: [...LINEAR_ISSUE_EVENTS],
194
- suggestedEvents: [...LINEAR_ISSUE_EVENTS]
203
+ suggestedEvents: [...LINEAR_ISSUE_EVENTS],
204
+ matchFields: LINEAR_ISSUE_MATCH_FIELDS
195
205
  },
196
206
  {
197
207
  type: "team",
198
208
  supportedEvents: [...LINEAR_ISSUE_EVENTS],
199
- suggestedEvents: [...LINEAR_ISSUE_EVENTS]
209
+ suggestedEvents: [...LINEAR_ISSUE_EVENTS],
210
+ matchFields: LINEAR_ISSUE_MATCH_FIELDS
200
211
  }
201
212
  ],
202
213
  isEnabled: () => Boolean(linearWebhookSecret()),
@@ -1,5 +1,11 @@
1
- import type { SubscribableResource } from "@sentry/junior-plugin-api";
1
+ import { type SubscribableResource } from "@sentry/junior-plugin-api";
2
2
  export declare const LINEAR_ISSUE_EVENTS: readonly ["issue.created"];
3
+ /** Exact values Linear may set on issue event data. Missing keys do not match. */
4
+ export declare const LINEAR_ISSUE_MATCH_FIELDS: Record<string, {
5
+ kind: "string" | "number" | "boolean";
6
+ description: string;
7
+ enum?: string[] | undefined;
8
+ }>;
3
9
  /** Build the stable Linear issue identity shared by tools and webhooks. */
4
10
  export declare function linearIssueResource(input: {
5
11
  identifier: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-linear",
3
- "version": "0.189.0",
3
+ "version": "0.191.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,8 +22,8 @@
22
22
  "skills"
23
23
  ],
24
24
  "dependencies": {
25
- "zod": "^4.4.3",
26
- "@sentry/junior-plugin-api": "0.189.0"
25
+ "zod": "^4.5.4",
26
+ "@sentry/junior-plugin-api": "0.191.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@oxlint/plugins": "1.79.0",