Repository navigation
Commit 4b2aa60
feat: add draft-segment-schema-pr action (#294)
* feat: add draft-segment-schema-pr action
Open a Consensys/segment-schema draft from Mobile or Extension analytics diffs after the PR author agrees, using the GitHub API for the client file list.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Update Jest configuration coverage thresholds and enhance Segment schema draft action
- Increased coverage thresholds for branches, functions, lines, and statements in jest.config.js.
- Improved README.md to clarify the usage of the Segment schema draft CLI.
- Modified the draft-segment-schema-pr action to ensure proper fetching of remote branches and handle analytics hits more accurately.
- Updated various functions to correctly count and manage TypeScript file changes, including handling renamed files and ensuring unique event paths in the schema.
- Added tests to validate new functionality and ensure existing behavior remains intact.
* fix: format the draft Segment schema action README
Prettier rejects the unaligned markdown table in CI.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: list schema pulls with the schema app token
The github-script client replaces Authorization, so schema reads need their own client.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: use the github-script getOctokit global
Declaring getOctokit again throws because github-script already injects it.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: identify proposal comments by the workflow bot login
Publish called GET /user, and the workflow token rejects that request.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: record the schema create open and opt-out checks
Callers re-read the client pull request under the write lock before minting the App token.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: give colliding event names distinct schema filenames
Names that share a kebab slug now get a stable suffixed YAML path so each event is written to its own file.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent b1b556f commit 4b2aa60
41 files changed
Lines changed: 5823 additions & 13 deletions
File tree
- .github/actions/draft-segment-schema-pr
- src
- segment-schema-draft-pr
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments