@ascenda-one/github-collector 0.1.28 → 0.1.34
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 +35 -8
- package/dist/cli.js +2254 -223
- package/dist/config.js +5 -2
- package/dist/config.js.map +1 -1
- package/examples/workflow.yml +21 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,10 +52,11 @@ separately revocable.
|
|
|
52
52
|
|
|
53
53
|
## Use in GitHub Actions
|
|
54
54
|
|
|
55
|
-
Ready to copy: [`examples/workflow.yml`](./examples/workflow.yml).
|
|
56
|
-
|
|
57
|
-
`npx -y @ascenda-one/claude-code-hooks pair --tool-type github_collector
|
|
58
|
-
prints the installation id and names the token file to read.
|
|
55
|
+
Ready to copy: [`examples/workflow.yml`](./examples/workflow.yml). Each person
|
|
56
|
+
pairs a collector identity of their own,
|
|
57
|
+
`npx -y @ascenda-one/claude-code-hooks pair --tool-type github_collector`, which
|
|
58
|
+
prints the installation id and names the token file to read. Those go into
|
|
59
|
+
repository secrets with that person's suffix, along with their GitHub login.
|
|
59
60
|
|
|
60
61
|
```yaml
|
|
61
62
|
name: ascenda-collaboration
|
|
@@ -69,13 +70,39 @@ jobs:
|
|
|
69
70
|
collect:
|
|
70
71
|
runs-on: ubuntu-latest
|
|
71
72
|
steps:
|
|
72
|
-
-
|
|
73
|
+
- name: ascenda (octocat)
|
|
74
|
+
run: npx @ascenda-one/github-collector
|
|
73
75
|
env:
|
|
74
|
-
ASCENDA_TOOL_INSTALLATION_ID: ${{ secrets.
|
|
75
|
-
ASCENDA_EVENT_WRITE_TOKEN: ${{ secrets.
|
|
76
|
-
ASCENDA_FORGE_LOGIN: ${{
|
|
76
|
+
ASCENDA_TOOL_INSTALLATION_ID: ${{ secrets.ASCENDA_TOOL_INSTALLATION_ID_OCTOCAT }}
|
|
77
|
+
ASCENDA_EVENT_WRITE_TOKEN: ${{ secrets.ASCENDA_EVENT_WRITE_TOKEN_OCTOCAT }}
|
|
78
|
+
ASCENDA_FORGE_LOGIN: ${{ secrets.ASCENDA_FORGE_LOGIN_OCTOCAT }}
|
|
77
79
|
```
|
|
78
80
|
|
|
81
|
+
### `ASCENDA_FORGE_LOGIN` is configured, never derived
|
|
82
|
+
|
|
83
|
+
Set it to the paired person's own login, once, when you store their secrets.
|
|
84
|
+
Don't use `${{ github.actor }}`. The actor is whoever triggered the run, and
|
|
85
|
+
the installation secrets belong to one person:
|
|
86
|
+
|
|
87
|
+
- When a colleague opens a pull request or submits a review, they're the
|
|
88
|
+
actor *and* the author, so the event matches and lands under your
|
|
89
|
+
installation. That records a colleague.
|
|
90
|
+
- On `review_requested` the actor is the person asking. Your request would
|
|
91
|
+
only match if you'd asked yourself, so `review_requested_of_me` never fires.
|
|
92
|
+
|
|
93
|
+
The collector can't tell a typed login from one wired to the actor, so this
|
|
94
|
+
rule lives in your workflow file.
|
|
95
|
+
|
|
96
|
+
### One step per participant
|
|
97
|
+
|
|
98
|
+
A step carries one person's installation, so a repository shared by several
|
|
99
|
+
people who've paired needs one step each, every one with its own suffixed
|
|
100
|
+
secrets. Each step reads the same payload and emits only its own person's
|
|
101
|
+
activity; the others exit with nothing to send. A matrix over the suffixes
|
|
102
|
+
works too, with `secrets[format('ASCENDA_FORGE_LOGIN_{0}', matrix.who)]` and
|
|
103
|
+
the same for the other two. Bear in mind that anyone who can edit the workflow
|
|
104
|
+
can read every participant's write token in a run.
|
|
105
|
+
|
|
79
106
|
The step exits 0 on every path that is not a configuration error, including
|
|
80
107
|
"nothing to emit". A telemetry step must never be the reason a build goes red.
|
|
81
108
|
|