@sentry/junior-github 0.313.0 → 0.314.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/testing.js CHANGED
@@ -1 +1 @@
1
- export { n as normalizeGitHubEvents } from "./events-mAaCafvx.js";
1
+ export { n as normalizeGitHubEvents } from "./events-D51HE9X3.js";
@@ -1,9 +1,10 @@
1
+ -- Core migrations run first and drop the url columns, so this backfill
2
+ -- writes no links. The GitHub plugin builds them from the name and number.
1
3
  INSERT INTO junior_code_repositories (
2
4
  id,
3
5
  name,
4
6
  provider,
5
7
  provider_id,
6
- url,
7
8
  updated_at
8
9
  )
9
10
  SELECT DISTINCT ON (repository_id)
@@ -11,13 +12,11 @@ SELECT DISTINCT ON (repository_id)
11
12
  repository_full_name,
12
13
  'github',
13
14
  repository_id,
14
- 'https://github.com/' || repository_full_name,
15
15
  updated_at
16
16
  FROM junior_github_pull_requests
17
17
  ORDER BY repository_id, updated_at DESC
18
18
  ON CONFLICT (provider, provider_id) DO UPDATE SET
19
19
  name = EXCLUDED.name,
20
- url = EXCLUDED.url,
21
20
  updated_at = EXCLUDED.updated_at
22
21
  WHERE junior_code_repositories.updated_at <= EXCLUDED.updated_at;
23
22
  --> statement-breakpoint
@@ -32,8 +31,7 @@ INSERT INTO junior_code_changes (
32
31
  provider_id,
33
32
  repository_id,
34
33
  state,
35
- updated_at,
36
- url
34
+ updated_at
37
35
  )
38
36
  SELECT
39
37
  gen_random_uuid(),
@@ -49,8 +47,7 @@ SELECT
49
47
  WHEN 'closed_unmerged' THEN 'closed'
50
48
  ELSE github_change.state
51
49
  END,
52
- github_change.updated_at,
53
- 'https://github.com/' || github_change.repository_full_name || '/pull/' || github_change.number
50
+ github_change.updated_at
54
51
  FROM junior_github_pull_requests AS github_change
55
52
  JOIN junior_code_repositories AS repository
56
53
  ON repository.provider = 'github'
@@ -69,6 +66,5 @@ ON CONFLICT (provider, provider_id) DO UPDATE SET
69
66
  opened_at = EXCLUDED.opened_at,
70
67
  repository_id = EXCLUDED.repository_id,
71
68
  state = EXCLUDED.state,
72
- updated_at = EXCLUDED.updated_at,
73
- url = EXCLUDED.url
69
+ updated_at = EXCLUDED.updated_at
74
70
  WHERE junior_code_changes.updated_at <= EXCLUDED.updated_at;
@@ -0,0 +1 @@
1
+ DROP TABLE "junior_github_pull_request_issues" CASCADE;
@@ -0,0 +1 @@
1
+ DROP TABLE "junior_github_issues" CASCADE;
@@ -0,0 +1,364 @@
1
+ {
2
+ "id": "b85b88bb-e673-46b0-bf5a-e3582daae286",
3
+ "prevId": "84ce1936-1b4b-461e-95a0-f3dbfd5d14fb",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_github_issues": {
8
+ "name": "junior_github_issues",
9
+ "schema": "",
10
+ "columns": {
11
+ "issue_id": {
12
+ "name": "issue_id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "repository_id": {
18
+ "name": "repository_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "repository_full_name": {
24
+ "name": "repository_full_name",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "number": {
30
+ "name": "number",
31
+ "type": "integer",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "state": {
36
+ "name": "state",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "state_reason": {
42
+ "name": "state_reason",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "conversation_ids": {
48
+ "name": "conversation_ids",
49
+ "type": "text[]",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "default": "ARRAY[]::text[]"
53
+ },
54
+ "opened_at": {
55
+ "name": "opened_at",
56
+ "type": "timestamp with time zone",
57
+ "primaryKey": false,
58
+ "notNull": true
59
+ },
60
+ "closed_at": {
61
+ "name": "closed_at",
62
+ "type": "timestamp with time zone",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "updated_at": {
67
+ "name": "updated_at",
68
+ "type": "timestamp with time zone",
69
+ "primaryKey": false,
70
+ "notNull": true
71
+ }
72
+ },
73
+ "indexes": {
74
+ "junior_github_issues_opened_at_idx": {
75
+ "name": "junior_github_issues_opened_at_idx",
76
+ "columns": [
77
+ {
78
+ "expression": "opened_at",
79
+ "isExpression": false,
80
+ "asc": true,
81
+ "nulls": "last"
82
+ }
83
+ ],
84
+ "isUnique": false,
85
+ "concurrently": false,
86
+ "method": "btree",
87
+ "with": {}
88
+ },
89
+ "junior_github_issues_closed_at_idx": {
90
+ "name": "junior_github_issues_closed_at_idx",
91
+ "columns": [
92
+ {
93
+ "expression": "closed_at",
94
+ "isExpression": false,
95
+ "asc": true,
96
+ "nulls": "last"
97
+ }
98
+ ],
99
+ "isUnique": false,
100
+ "concurrently": false,
101
+ "method": "btree",
102
+ "with": {}
103
+ },
104
+ "junior_github_issues_open_idx": {
105
+ "name": "junior_github_issues_open_idx",
106
+ "columns": [
107
+ {
108
+ "expression": "issue_id",
109
+ "isExpression": false,
110
+ "asc": true,
111
+ "nulls": "last"
112
+ }
113
+ ],
114
+ "isUnique": false,
115
+ "where": "\"junior_github_issues\".\"state\" = 'open'",
116
+ "concurrently": false,
117
+ "method": "btree",
118
+ "with": {}
119
+ }
120
+ },
121
+ "foreignKeys": {},
122
+ "compositePrimaryKeys": {},
123
+ "uniqueConstraints": {},
124
+ "policies": {},
125
+ "checkConstraints": {},
126
+ "isRLSEnabled": false
127
+ },
128
+ "public.junior_github_pull_request_requesters": {
129
+ "name": "junior_github_pull_request_requesters",
130
+ "schema": "",
131
+ "columns": {
132
+ "repository_full_name": {
133
+ "name": "repository_full_name",
134
+ "type": "text",
135
+ "primaryKey": false,
136
+ "notNull": true
137
+ },
138
+ "number": {
139
+ "name": "number",
140
+ "type": "integer",
141
+ "primaryKey": false,
142
+ "notNull": true
143
+ },
144
+ "identity_id": {
145
+ "name": "identity_id",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": true
149
+ },
150
+ "conversation_id": {
151
+ "name": "conversation_id",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": false
155
+ },
156
+ "created_at": {
157
+ "name": "created_at",
158
+ "type": "timestamp with time zone",
159
+ "primaryKey": false,
160
+ "notNull": true
161
+ },
162
+ "updated_at": {
163
+ "name": "updated_at",
164
+ "type": "timestamp with time zone",
165
+ "primaryKey": false,
166
+ "notNull": true
167
+ }
168
+ },
169
+ "indexes": {},
170
+ "foreignKeys": {},
171
+ "compositePrimaryKeys": {
172
+ "junior_github_pull_request_requesters_repository_full_name_number_identity_id_pk": {
173
+ "name": "junior_github_pull_request_requesters_repository_full_name_number_identity_id_pk",
174
+ "columns": [
175
+ "repository_full_name",
176
+ "number",
177
+ "identity_id"
178
+ ]
179
+ }
180
+ },
181
+ "uniqueConstraints": {},
182
+ "policies": {},
183
+ "checkConstraints": {},
184
+ "isRLSEnabled": false
185
+ },
186
+ "public.junior_github_pull_requests": {
187
+ "name": "junior_github_pull_requests",
188
+ "schema": "",
189
+ "columns": {
190
+ "pull_request_id": {
191
+ "name": "pull_request_id",
192
+ "type": "text",
193
+ "primaryKey": true,
194
+ "notNull": true
195
+ },
196
+ "repository_id": {
197
+ "name": "repository_id",
198
+ "type": "text",
199
+ "primaryKey": false,
200
+ "notNull": true
201
+ },
202
+ "repository_full_name": {
203
+ "name": "repository_full_name",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": true
207
+ },
208
+ "number": {
209
+ "name": "number",
210
+ "type": "integer",
211
+ "primaryKey": false,
212
+ "notNull": true
213
+ },
214
+ "state": {
215
+ "name": "state",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": true
219
+ },
220
+ "commit_composition": {
221
+ "name": "commit_composition",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": false
225
+ },
226
+ "conversation_ids": {
227
+ "name": "conversation_ids",
228
+ "type": "text[]",
229
+ "primaryKey": false,
230
+ "notNull": true,
231
+ "default": "ARRAY[]::text[]"
232
+ },
233
+ "opened_at": {
234
+ "name": "opened_at",
235
+ "type": "timestamp with time zone",
236
+ "primaryKey": false,
237
+ "notNull": true
238
+ },
239
+ "finished_at": {
240
+ "name": "finished_at",
241
+ "type": "timestamp with time zone",
242
+ "primaryKey": false,
243
+ "notNull": false
244
+ },
245
+ "updated_at": {
246
+ "name": "updated_at",
247
+ "type": "timestamp with time zone",
248
+ "primaryKey": false,
249
+ "notNull": true
250
+ },
251
+ "next_action": {
252
+ "name": "next_action",
253
+ "type": "text",
254
+ "primaryKey": false,
255
+ "notNull": false
256
+ },
257
+ "ready_sync_requests": {
258
+ "name": "ready_sync_requests",
259
+ "type": "integer",
260
+ "primaryKey": false,
261
+ "notNull": true,
262
+ "default": 0
263
+ },
264
+ "ready_sync_id": {
265
+ "name": "ready_sync_id",
266
+ "type": "integer",
267
+ "primaryKey": false,
268
+ "notNull": false
269
+ },
270
+ "ready_sync_at": {
271
+ "name": "ready_sync_at",
272
+ "type": "timestamp with time zone",
273
+ "primaryKey": false,
274
+ "notNull": false
275
+ },
276
+ "conflict_fixes_resumed_at": {
277
+ "name": "conflict_fixes_resumed_at",
278
+ "type": "timestamp with time zone",
279
+ "primaryKey": false,
280
+ "notNull": false
281
+ },
282
+ "conflict_fix_asked_at": {
283
+ "name": "conflict_fix_asked_at",
284
+ "type": "timestamp with time zone",
285
+ "primaryKey": false,
286
+ "notNull": false
287
+ },
288
+ "conflict_fixes": {
289
+ "name": "conflict_fixes",
290
+ "type": "jsonb",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "default": "'[]'::jsonb"
294
+ }
295
+ },
296
+ "indexes": {
297
+ "junior_github_pull_requests_opened_at_idx": {
298
+ "name": "junior_github_pull_requests_opened_at_idx",
299
+ "columns": [
300
+ {
301
+ "expression": "opened_at",
302
+ "isExpression": false,
303
+ "asc": true,
304
+ "nulls": "last"
305
+ }
306
+ ],
307
+ "isUnique": false,
308
+ "concurrently": false,
309
+ "method": "btree",
310
+ "with": {}
311
+ },
312
+ "junior_github_pull_requests_open_idx": {
313
+ "name": "junior_github_pull_requests_open_idx",
314
+ "columns": [
315
+ {
316
+ "expression": "pull_request_id",
317
+ "isExpression": false,
318
+ "asc": true,
319
+ "nulls": "last"
320
+ }
321
+ ],
322
+ "isUnique": false,
323
+ "where": "\"junior_github_pull_requests\".\"state\" = 'open'",
324
+ "concurrently": false,
325
+ "method": "btree",
326
+ "with": {}
327
+ },
328
+ "junior_github_pull_requests_unmerged_conversations_idx": {
329
+ "name": "junior_github_pull_requests_unmerged_conversations_idx",
330
+ "columns": [
331
+ {
332
+ "expression": "conversation_ids",
333
+ "isExpression": false,
334
+ "asc": true,
335
+ "nulls": "last"
336
+ }
337
+ ],
338
+ "isUnique": false,
339
+ "where": "\"junior_github_pull_requests\".\"state\" <> 'merged'",
340
+ "concurrently": false,
341
+ "method": "gin",
342
+ "with": {}
343
+ }
344
+ },
345
+ "foreignKeys": {},
346
+ "compositePrimaryKeys": {},
347
+ "uniqueConstraints": {},
348
+ "policies": {},
349
+ "checkConstraints": {},
350
+ "isRLSEnabled": false
351
+ }
352
+ },
353
+ "enums": {},
354
+ "schemas": {},
355
+ "sequences": {},
356
+ "roles": {},
357
+ "policies": {},
358
+ "views": {},
359
+ "_meta": {
360
+ "columns": {},
361
+ "schemas": {},
362
+ "tables": {}
363
+ }
364
+ }
@@ -0,0 +1,243 @@
1
+ {
2
+ "id": "1fadcb30-52c2-4998-858b-124b9dcbc2da",
3
+ "prevId": "b85b88bb-e673-46b0-bf5a-e3582daae286",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_github_pull_request_requesters": {
8
+ "name": "junior_github_pull_request_requesters",
9
+ "schema": "",
10
+ "columns": {
11
+ "repository_full_name": {
12
+ "name": "repository_full_name",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "number": {
18
+ "name": "number",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "identity_id": {
24
+ "name": "identity_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "conversation_id": {
30
+ "name": "conversation_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": false
34
+ },
35
+ "created_at": {
36
+ "name": "created_at",
37
+ "type": "timestamp with time zone",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "updated_at": {
42
+ "name": "updated_at",
43
+ "type": "timestamp with time zone",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ }
47
+ },
48
+ "indexes": {},
49
+ "foreignKeys": {},
50
+ "compositePrimaryKeys": {
51
+ "junior_github_pull_request_requesters_repository_full_name_number_identity_id_pk": {
52
+ "name": "junior_github_pull_request_requesters_repository_full_name_number_identity_id_pk",
53
+ "columns": [
54
+ "repository_full_name",
55
+ "number",
56
+ "identity_id"
57
+ ]
58
+ }
59
+ },
60
+ "uniqueConstraints": {},
61
+ "policies": {},
62
+ "checkConstraints": {},
63
+ "isRLSEnabled": false
64
+ },
65
+ "public.junior_github_pull_requests": {
66
+ "name": "junior_github_pull_requests",
67
+ "schema": "",
68
+ "columns": {
69
+ "pull_request_id": {
70
+ "name": "pull_request_id",
71
+ "type": "text",
72
+ "primaryKey": true,
73
+ "notNull": true
74
+ },
75
+ "repository_id": {
76
+ "name": "repository_id",
77
+ "type": "text",
78
+ "primaryKey": false,
79
+ "notNull": true
80
+ },
81
+ "repository_full_name": {
82
+ "name": "repository_full_name",
83
+ "type": "text",
84
+ "primaryKey": false,
85
+ "notNull": true
86
+ },
87
+ "number": {
88
+ "name": "number",
89
+ "type": "integer",
90
+ "primaryKey": false,
91
+ "notNull": true
92
+ },
93
+ "state": {
94
+ "name": "state",
95
+ "type": "text",
96
+ "primaryKey": false,
97
+ "notNull": true
98
+ },
99
+ "commit_composition": {
100
+ "name": "commit_composition",
101
+ "type": "text",
102
+ "primaryKey": false,
103
+ "notNull": false
104
+ },
105
+ "conversation_ids": {
106
+ "name": "conversation_ids",
107
+ "type": "text[]",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "default": "ARRAY[]::text[]"
111
+ },
112
+ "opened_at": {
113
+ "name": "opened_at",
114
+ "type": "timestamp with time zone",
115
+ "primaryKey": false,
116
+ "notNull": true
117
+ },
118
+ "finished_at": {
119
+ "name": "finished_at",
120
+ "type": "timestamp with time zone",
121
+ "primaryKey": false,
122
+ "notNull": false
123
+ },
124
+ "updated_at": {
125
+ "name": "updated_at",
126
+ "type": "timestamp with time zone",
127
+ "primaryKey": false,
128
+ "notNull": true
129
+ },
130
+ "next_action": {
131
+ "name": "next_action",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": false
135
+ },
136
+ "ready_sync_requests": {
137
+ "name": "ready_sync_requests",
138
+ "type": "integer",
139
+ "primaryKey": false,
140
+ "notNull": true,
141
+ "default": 0
142
+ },
143
+ "ready_sync_id": {
144
+ "name": "ready_sync_id",
145
+ "type": "integer",
146
+ "primaryKey": false,
147
+ "notNull": false
148
+ },
149
+ "ready_sync_at": {
150
+ "name": "ready_sync_at",
151
+ "type": "timestamp with time zone",
152
+ "primaryKey": false,
153
+ "notNull": false
154
+ },
155
+ "conflict_fixes_resumed_at": {
156
+ "name": "conflict_fixes_resumed_at",
157
+ "type": "timestamp with time zone",
158
+ "primaryKey": false,
159
+ "notNull": false
160
+ },
161
+ "conflict_fix_asked_at": {
162
+ "name": "conflict_fix_asked_at",
163
+ "type": "timestamp with time zone",
164
+ "primaryKey": false,
165
+ "notNull": false
166
+ },
167
+ "conflict_fixes": {
168
+ "name": "conflict_fixes",
169
+ "type": "jsonb",
170
+ "primaryKey": false,
171
+ "notNull": true,
172
+ "default": "'[]'::jsonb"
173
+ }
174
+ },
175
+ "indexes": {
176
+ "junior_github_pull_requests_opened_at_idx": {
177
+ "name": "junior_github_pull_requests_opened_at_idx",
178
+ "columns": [
179
+ {
180
+ "expression": "opened_at",
181
+ "isExpression": false,
182
+ "asc": true,
183
+ "nulls": "last"
184
+ }
185
+ ],
186
+ "isUnique": false,
187
+ "concurrently": false,
188
+ "method": "btree",
189
+ "with": {}
190
+ },
191
+ "junior_github_pull_requests_open_idx": {
192
+ "name": "junior_github_pull_requests_open_idx",
193
+ "columns": [
194
+ {
195
+ "expression": "pull_request_id",
196
+ "isExpression": false,
197
+ "asc": true,
198
+ "nulls": "last"
199
+ }
200
+ ],
201
+ "isUnique": false,
202
+ "where": "\"junior_github_pull_requests\".\"state\" = 'open'",
203
+ "concurrently": false,
204
+ "method": "btree",
205
+ "with": {}
206
+ },
207
+ "junior_github_pull_requests_unmerged_conversations_idx": {
208
+ "name": "junior_github_pull_requests_unmerged_conversations_idx",
209
+ "columns": [
210
+ {
211
+ "expression": "conversation_ids",
212
+ "isExpression": false,
213
+ "asc": true,
214
+ "nulls": "last"
215
+ }
216
+ ],
217
+ "isUnique": false,
218
+ "where": "\"junior_github_pull_requests\".\"state\" <> 'merged'",
219
+ "concurrently": false,
220
+ "method": "gin",
221
+ "with": {}
222
+ }
223
+ },
224
+ "foreignKeys": {},
225
+ "compositePrimaryKeys": {},
226
+ "uniqueConstraints": {},
227
+ "policies": {},
228
+ "checkConstraints": {},
229
+ "isRLSEnabled": false
230
+ }
231
+ },
232
+ "enums": {},
233
+ "schemas": {},
234
+ "sequences": {},
235
+ "roles": {},
236
+ "policies": {},
237
+ "views": {},
238
+ "_meta": {
239
+ "columns": {},
240
+ "schemas": {},
241
+ "tables": {}
242
+ }
243
+ }
@@ -127,6 +127,20 @@
127
127
  "when": 1795220519456,
128
128
  "tag": "0017_pull_request_lifecycle_copies",
129
129
  "breakpoints": true
130
+ },
131
+ {
132
+ "idx": 18,
133
+ "version": "7",
134
+ "when": 1795468842953,
135
+ "tag": "0018_drop_pull_request_issues",
136
+ "breakpoints": true
137
+ },
138
+ {
139
+ "idx": 19,
140
+ "version": "7",
141
+ "when": 1795471772394,
142
+ "tag": "0019_drop_github_issues",
143
+ "breakpoints": true
130
144
  }
131
145
  ]
132
146
  }