@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/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAEjE;;;;;;;;;GASG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IAEnC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,4EAA4E;IAC5E,+EAA+E;IAC/E,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,eAAe,EAAE,CAAC;IACvE,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,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E,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;QAAE,OAAO,SAAS,CAAC;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/B,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,CAAC;IAAC,MAAM,CAAC;QACP,wEAAwE;QACxE,OAAO,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;QAC/E,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,KAAK,UAAU,SAAS;IACtB,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,sBAAsB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9F,2EAA2E;IAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/mapForgeEvent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forgeProjectHash } from "@ascenda-one/tool-kit";
|
|
1
|
+
import { forgeBranchKey, forgeProjectHash, forgeRepoKey } from "@ascenda-one/tool-kit";
|
|
2
2
|
/**
|
|
3
3
|
* Maps a code-forge event to Ascenda's collaboration events (§4.2's
|
|
4
4
|
* collaboration family).
|
|
@@ -21,13 +21,24 @@ import { forgeProjectHash } from "@ascenda-one/tool-kit";
|
|
|
21
21
|
*
|
|
22
22
|
* No repository name, PR title, branch name, PR number, or any other person's
|
|
23
23
|
* login. The repository is reduced to an opaque hash so that "always the same
|
|
24
|
-
* repo" stays answerable without naming it, and
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* repo" stays answerable without naming it, and the head branch to a digest so
|
|
25
|
+
* a coding session on that branch can be matched to the pull request. Nothing
|
|
26
|
+
* else about the change is carried. There is no field on the emitted metadata
|
|
27
|
+
* that a title or a body could be placed in.
|
|
28
|
+
*
|
|
29
|
+
* ## Matching a session
|
|
30
|
+
*
|
|
31
|
+
* A pull request of yours carries `repoKey` and `branchKey`, computed the way
|
|
32
|
+
* the hooks compute them on a developer's machine (see forgeProject.ts), and
|
|
33
|
+
* the times GitHub gives for it being created, closed and merged. The keys are
|
|
34
|
+
* unsalted, so anyone who guesses a repository or branch name can confirm it.
|
|
35
|
+
* That is the trade-off the repository digest already made, with a branch name
|
|
36
|
+
* added.
|
|
27
37
|
*/
|
|
28
|
-
export function mapForgeEvent(eventName, payload, viewerLogin) {
|
|
38
|
+
export function mapForgeEvent(eventName, payload, viewerLogin, options = {}) {
|
|
29
39
|
if (!eventName || !viewerLogin)
|
|
30
40
|
return [];
|
|
41
|
+
const keys = options.repoKeys !== false;
|
|
31
42
|
const action = str(payload["action"]);
|
|
32
43
|
const viewer = viewerLogin.toLowerCase();
|
|
33
44
|
if (eventName === "pull_request") {
|
|
@@ -37,7 +48,18 @@ export function mapForgeEvent(eventName, payload, viewerLogin) {
|
|
|
37
48
|
return [{
|
|
38
49
|
eventType: "pull_request_opened",
|
|
39
50
|
severity: "low",
|
|
40
|
-
metadata: base(payload)
|
|
51
|
+
metadata: { ...base(payload, keys), ...pullRequestKeys(payload, pr, keys) }
|
|
52
|
+
}];
|
|
53
|
+
}
|
|
54
|
+
// How a pull request of mine ended. Merging is mine to record whoever
|
|
55
|
+
// pressed the button: the merger's identity is not read, only that my pull
|
|
56
|
+
// request is done and when.
|
|
57
|
+
if (action === "closed" && author === viewer) {
|
|
58
|
+
const merged = pr["merged"] === true;
|
|
59
|
+
return [{
|
|
60
|
+
eventType: merged ? "pull_request_merged" : "pull_request_closed",
|
|
61
|
+
severity: "low",
|
|
62
|
+
metadata: { ...base(payload, keys), ...pullRequestKeys(payload, pr, keys), ...pullRequestTimes(pr, merged) }
|
|
41
63
|
}];
|
|
42
64
|
}
|
|
43
65
|
// A review request naming the viewer. The requester is not recorded: what
|
|
@@ -48,7 +70,7 @@ export function mapForgeEvent(eventName, payload, viewerLogin) {
|
|
|
48
70
|
return [{
|
|
49
71
|
eventType: "review_requested_of_me",
|
|
50
72
|
severity: "low",
|
|
51
|
-
metadata: base(payload)
|
|
73
|
+
metadata: { ...base(payload, keys), ...pullRequestKeys(payload, pr, keys) }
|
|
52
74
|
}];
|
|
53
75
|
}
|
|
54
76
|
}
|
|
@@ -63,7 +85,8 @@ export function mapForgeEvent(eventName, payload, viewerLogin) {
|
|
|
63
85
|
eventType: "review_given",
|
|
64
86
|
severity: "low",
|
|
65
87
|
metadata: {
|
|
66
|
-
...base(payload),
|
|
88
|
+
...base(payload, keys),
|
|
89
|
+
...pullRequestKeys(payload, obj(payload["pull_request"]), keys),
|
|
67
90
|
// The verdict is a property of the checking work, not of the author,
|
|
68
91
|
// and it is the closest thing to a "how heavy was this review" signal
|
|
69
92
|
// that carries no content. `commented` and `changes_requested` are
|
|
@@ -74,7 +97,7 @@ export function mapForgeEvent(eventName, payload, viewerLogin) {
|
|
|
74
97
|
}
|
|
75
98
|
return [];
|
|
76
99
|
}
|
|
77
|
-
function base(payload) {
|
|
100
|
+
function base(payload, keys) {
|
|
78
101
|
const repo = str(obj(payload["repository"])["full_name"]);
|
|
79
102
|
return {
|
|
80
103
|
host: "github",
|
|
@@ -88,9 +111,73 @@ function base(payload) {
|
|
|
88
111
|
// function now lives in tool-kit so a developer's own machine, which holds
|
|
89
112
|
// both identities, can compute this exact digest and file it beside its
|
|
90
113
|
// own; nothing about what this step emits has changed.
|
|
91
|
-
...(repo ? { projectHash: forgeProjectHash(repo) } : {})
|
|
114
|
+
...(repo ? { projectHash: forgeProjectHash(repo) } : {}),
|
|
115
|
+
...(keys && repo && onGithub(obj(payload["repository"])) ? { repoKey: forgeRepoKey(repo) } : {})
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The keys a session on this pull request's head branch carries.
|
|
120
|
+
*
|
|
121
|
+
* A clone of a fork has the fork as `origin`, so its sessions are keyed by the
|
|
122
|
+
* fork, not by the base repository. The branch key therefore uses the head
|
|
123
|
+
* repository when GitHub gives one, and `headRepoKey` names it when it isn't
|
|
124
|
+
* the base. Same limits as the hooks:
|
|
125
|
+
*
|
|
126
|
+
* - github.com only. A payload whose repository URL is on another host gets
|
|
127
|
+
* nothing, and one with no URL is taken as github.com's.
|
|
128
|
+
* - No branch key on the head repository's default branch.
|
|
129
|
+
* - A deleted fork leaves `head.repo` null. Its name is gone, so the branch
|
|
130
|
+
* can't be hashed the way the contributor's clone did, and the key is left
|
|
131
|
+
* off rather than taken from the base repository.
|
|
132
|
+
* - Nothing at all when `keys` is false.
|
|
133
|
+
*/
|
|
134
|
+
function pullRequestKeys(payload, pr, keys) {
|
|
135
|
+
if (!keys || !onGithub(obj(payload["repository"])))
|
|
136
|
+
return {};
|
|
137
|
+
const head = obj(pr["head"]);
|
|
138
|
+
const headRepo = obj(head["repo"]);
|
|
139
|
+
const base = str(obj(obj(pr["base"])["repo"])["full_name"]) ?? str(obj(payload["repository"])["full_name"]);
|
|
140
|
+
const headName = head["repo"] === undefined ? base : str(headRepo["full_name"]);
|
|
141
|
+
const branch = str(head["ref"]);
|
|
142
|
+
const defaultBranch = head["repo"] === undefined
|
|
143
|
+
? str(obj(payload["repository"])["default_branch"])
|
|
144
|
+
: str(headRepo["default_branch"]);
|
|
145
|
+
const onDefault = branch !== undefined && branch === defaultBranch;
|
|
146
|
+
return {
|
|
147
|
+
...(headName && base && headName.toLowerCase() !== base.toLowerCase() ? { headRepoKey: forgeRepoKey(headName) } : {}),
|
|
148
|
+
...(headName && branch && !onDefault ? { branchKey: forgeBranchKey(headName, branch) } : {})
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function onGithub(repository) {
|
|
152
|
+
const url = str(repository["html_url"]);
|
|
153
|
+
if (!url)
|
|
154
|
+
return true;
|
|
155
|
+
try {
|
|
156
|
+
return new URL(url).hostname.toLowerCase().replace(/^www\./, "") === "github.com";
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** `repoKey` is the base repository's; see {@link pullRequestKeys} for the head's. */
|
|
163
|
+
function pullRequestTimes(pr, merged) {
|
|
164
|
+
const created = timestamp(pr["created_at"]);
|
|
165
|
+
const closed = timestamp(pr["closed_at"]);
|
|
166
|
+
const mergedAt = merged ? timestamp(pr["merged_at"]) : undefined;
|
|
167
|
+
return {
|
|
168
|
+
...(created ? { prCreatedAt: created } : {}),
|
|
169
|
+
...(closed ? { prClosedAt: closed } : {}),
|
|
170
|
+
...(mergedAt ? { prMergedAt: mergedAt } : {})
|
|
92
171
|
};
|
|
93
172
|
}
|
|
173
|
+
/** An ISO 8601 string GitHub sent, normalised, or nothing for anything else. */
|
|
174
|
+
function timestamp(value) {
|
|
175
|
+
const text = str(value);
|
|
176
|
+
if (!text)
|
|
177
|
+
return undefined;
|
|
178
|
+
const ms = Date.parse(text);
|
|
179
|
+
return Number.isNaN(ms) ? undefined : new Date(ms).toISOString();
|
|
180
|
+
}
|
|
94
181
|
/**
|
|
95
182
|
* A review verdict, mapped onto the shared outcome vocabulary. An approval is
|
|
96
183
|
* a success; anything asking for more work is not a *failure* of the reviewer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapForgeEvent.js","sourceRoot":"","sources":["../src/mapForgeEvent.ts"],"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AQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,SAAS,SAAS,CAAC,KAAc;IAC/B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,KAAyB;IAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACrE,CAAC;AAED,SAAS,GAAG,CAAC,KAAc;IACzB,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAiC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtF,CAAC;AAED,SAAS,GAAG,CAAC,KAAc;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC"}
|
package/examples/workflow.yml
CHANGED
|
@@ -24,7 +24,7 @@ name: ascenda-collaboration
|
|
|
24
24
|
|
|
25
25
|
on:
|
|
26
26
|
pull_request:
|
|
27
|
-
types: [opened, review_requested]
|
|
27
|
+
types: [opened, closed, review_requested]
|
|
28
28
|
pull_request_review:
|
|
29
29
|
types: [submitted]
|
|
30
30
|
|
|
@@ -38,6 +38,7 @@ jobs:
|
|
|
38
38
|
# One step per participant. Add a copy with another suffix for each
|
|
39
39
|
# colleague who pairs; each step emits only its own person's activity.
|
|
40
40
|
- name: ascenda (octocat)
|
|
41
|
+
# Add --no-repo-keys to leave the repository and branch digests off.
|
|
41
42
|
run: npx @ascenda-one/github-collector
|
|
42
43
|
env:
|
|
43
44
|
ASCENDA_TOOL_INSTALLATION_ID: ${{ secrets.ASCENDA_TOOL_INSTALLATION_ID_OCTOCAT }}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"publishConfig": { "access": "public" },
|
|
3
3
|
"name": "@ascenda-one/github-collector",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.36",
|
|
5
5
|
"description": "Code-forge collaboration collector for Ascenda work telemetry — first-person review and pull-request signals.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|