@sentry/junior-github 0.264.0 → 0.266.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
@@ -34,6 +34,57 @@ The plugin saves the created pull request before it tries assignment. Retrying
34
34
  the same tool call returns the saved pull request without retrying assignment,
35
35
  creating another pull request, or replacing existing assignees.
36
36
 
37
+ The plugin saves each person who asks Junior to open or update a pull request in
38
+ `junior_github_pull_request_requesters`. Each row has only the core Junior
39
+ identity id of that person. The plugin does not copy the user or GitHub login.
40
+ When a webhook needs the GitHub login, it reads the identity through
41
+ `ctx.users.readIdentity()` and uses the GitHub identity of the linked user. So a
42
+ person who links GitHub later is found on their older pull requests too. The
43
+ create tool saves the opener after GitHub opens the pull request. The first row
44
+ for a pull request is the opener. Later updates never replace it. When the
45
+ create has no Junior identity, the first person who asks Junior to update the
46
+ pull request is the opener. A retry of the same tool call saves the opener
47
+ again, in case the first call stopped before it did.
48
+
49
+ Pull request events have two kinds of people fields. `openerUsername`,
50
+ `openerEmail`, and `openerRole` name who opened the pull request. On a pull
51
+ request that Junior's bot opened, the opener is the person who asked Junior to
52
+ open it: the linked GitHub login of the saved opener row. With no saved row, no
53
+ linked GitHub login, or a failed identity lookup, the opener is unknown and the
54
+ event has no opener fields, so filters on them do not match. The bot is never
55
+ used in its place. An `opened` event can arrive before the create tool saves
56
+ the row. `authors` lists the GitHub logins of the commit authors and of the
57
+ `Co-authored-by` trailers with GitHub noreply emails, bots included. Webhooks
58
+ never read the pull request body.
59
+
60
+ The opener on Junior's pull requests, `openerRole`, and `authors` need database
61
+ or GitHub calls. A webhook loads the values that a Watch or event automation
62
+ filters on before it decides on a match. It loads the other values only when an
63
+ event matches, so the agent sees all of them. A failed load leaves the value
64
+ out. `authors` and the people involved in approvals and merges share one read of
65
+ the commits per delivery.
66
+
67
+ Deployment events come from GitHub `deployment` and `deployment_status`
68
+ webhooks:
69
+
70
+ | Event | GitHub source |
71
+ | ------------------------ | --------------------------- |
72
+ | `deployment.created` | `deployment` with `created` |
73
+ | `deployment.queued` | status `queued` |
74
+ | `deployment.pending` | status `pending` |
75
+ | `deployment.in_progress` | status `in_progress` |
76
+ | `deployment.succeeded` | status `success` |
77
+ | `deployment.failed` | status `failure` |
78
+ | `deployment.error` | status `error` |
79
+
80
+ GitHub has two failure states. `failure` means that the deployment ran and
81
+ failed. `error` means that the deploy tool reported an error. The deploy tool
82
+ sets the status, so the difference depends on that tool. Vercel
83
+ `deployment.error` is a failed deployment, so it is the same as GitHub
84
+ `deployment.failed`, not GitHub `deployment.error`. `succeeded`, `failed`, and
85
+ `error` end a watch on one commit and environment. Watches on a commit or a
86
+ repository stay active.
87
+
37
88
  The plugin owns its signed webhook route, deployment, pull request, and release
38
89
  events, and normalized pull request and issue outcome projections.
39
90
  Those projections also feed native code-change records used by the dashboard