@ascenda-one/github-collector 0.1.35 → 0.1.36
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 +39 -5
- package/dist/cli.js +1770 -824
- package/dist/cli.js.map +1 -1
- package/dist/mapForgeEvent.js +97 -10
- package/dist/mapForgeEvent.js.map +1 -1
- package/examples/workflow.yml +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ pull-request activity, collected from a code forge.
|
|
|
10
10
|
| `review_requested_of_me` | someone asked **you** to review | supervision |
|
|
11
11
|
| `review_given` | **you** submitted a review | supervision |
|
|
12
12
|
| `pull_request_opened` | **you** opened a pull request | creation |
|
|
13
|
+
| `pull_request_closed` | a pull request **you** opened was closed without merging | neutral |
|
|
14
|
+
| `pull_request_merged` | a pull request **you** opened was merged, by anyone | neutral |
|
|
13
15
|
|
|
14
16
|
The two review events are the report's *verification overload* concern — the
|
|
15
17
|
checking burden that concentrates on senior engineers as a team adopts AI.
|
|
@@ -30,11 +32,43 @@ minimum cohort size.
|
|
|
30
32
|
|
|
31
33
|
### What never travels
|
|
32
34
|
|
|
33
|
-
No repository name, PR title, branch, PR number, review body, or any other
|
|
35
|
+
No repository name, PR title, branch name, PR number, review body, or any other
|
|
34
36
|
person's login. The repository is reduced to an 8-character hash so that "is it
|
|
35
|
-
always the same repository" stays answerable without naming it
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
always the same repository" stays answerable without naming it, and the head
|
|
38
|
+
branch to a 16-character one (see below). There is no field on the emitted
|
|
39
|
+
metadata that a title or a body could be placed in, and a test asserts each of
|
|
40
|
+
those strings is absent from what gets sent.
|
|
41
|
+
|
|
42
|
+
### Matching a pull request to a coding session
|
|
43
|
+
|
|
44
|
+
Your pull request events, review events included, carry `repoKey` (the repository) and `branchKey` (the
|
|
45
|
+
head branch), plus `prCreatedAt`, and `prClosedAt` and `prMergedAt` once it's
|
|
46
|
+
done. The Claude Code collector puts the same two keys on each event of a
|
|
47
|
+
session, so a session and a pull request on the same repository and branch
|
|
48
|
+
carry the same pair. Match on the keys and on the session overlapping the PR's
|
|
49
|
+
open window, from `prCreatedAt` to `prClosedAt` or `prMergedAt`: a branch
|
|
50
|
+
called `fix` gets reused, and the window says which pull request a session was
|
|
51
|
+
working on.
|
|
52
|
+
|
|
53
|
+
- A pull request from a fork also carries `headRepoKey`. A clone of the fork has
|
|
54
|
+
the fork as its `origin`, so match its sessions against `headRepoKey`, and
|
|
55
|
+
against `repoKey` when there isn't one. The branch key is taken over the
|
|
56
|
+
fork's name for the same reason. If the fork has been deleted, there's no
|
|
57
|
+
branch key at all, since the name the clone hashed is gone.
|
|
58
|
+
- There's no `branchKey` when the head branch is its repository's default
|
|
59
|
+
branch. The hooks leave it off there too, so those match on `repoKey` and the
|
|
60
|
+
window alone.
|
|
61
|
+
- One session can span several branches. Each of its events carries the branch
|
|
62
|
+
it was on, so a session can match more than one pull request.
|
|
63
|
+
|
|
64
|
+
Only github.com repositories get keys.
|
|
65
|
+
|
|
66
|
+
**The trade-off.** Neither key is salted, because this step runs in CI where no
|
|
67
|
+
salt exists. Anyone holding one can check a guess at a repository or branch
|
|
68
|
+
name, and for a public repository those names are public. The repository
|
|
69
|
+
digest already made that trade; the branch digest adds a name to it. Turn the
|
|
70
|
+
keys off with `--no-repo-keys` on the command, or `ASCENDA_REPO_KEYS=off` in the
|
|
71
|
+
step's environment. The 8-character `projectHash` and the times stay.
|
|
38
72
|
|
|
39
73
|
### Withdrawal is not derivable, deliberately
|
|
40
74
|
|
|
@@ -62,7 +96,7 @@ repository secrets with that person's suffix, along with their GitHub login.
|
|
|
62
96
|
name: ascenda-collaboration
|
|
63
97
|
on:
|
|
64
98
|
pull_request:
|
|
65
|
-
types: [opened, review_requested]
|
|
99
|
+
types: [opened, closed, review_requested]
|
|
66
100
|
pull_request_review:
|
|
67
101
|
types: [submitted]
|
|
68
102
|
|