Commit 6097f79
authored
[CHORE] Migrate PRojection GHA/Workflow here for reusability (#20)
* Create overture-projection.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Update overture-projection.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Update overture-projection.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Add Overture PRojection GitHub Action
Introduce a new GitHub Action 'overture-projection' that posts AI-generated PR review comments driven by reusable "skills". Adds action metadata (action.yml), a detailed README, multiple step scripts (load-skills, fetch-diff, select-skills, fetch-context, post-review) and library modules with unit tests for defaults, diff handling, and context processing. The action supports GitHub Models and Anthropic providers, handles skill selection, per-file context fetching/truncation, diff budgeting, and generates/upserts review comments using an installation or workflow token.
Signed-off-by: John McCall <john@overturemaps.org>
* Update overture-projection.yml
Signed-off-by: John McCall <john@overturemaps.org>
* fix: reference composite action by full repo path for reusable workflow context
Signed-off-by: John McCall <john@overturemaps.org>
* fix: scope app token to omf-devex and target repo only, not all org repos
Signed-off-by: John McCall <john@overturemaps.org>
* Update action.yml
Signed-off-by: John McCall <john@overturemaps.org>
* overture-projection: CRLF fixes & workflow updates
Multiple fixes and workflow improvements for the overture-projection action:
- Make frontmatter/markdown parsing robust to CRLF line endings (skills.js, markdown.js).
- Improve fetch-diff comment to clarify file-dropping behavior order.
- Fix unit test setup that clobbered global fetch in models.test.js.
- Validate SKILLS_DIR presence and warn when empty/missing (load-skills.js).
- Adjust COMMENT_MODE docs/default wording and fail early if PR number can't be resolved (post-review.js).
- Add a dedicated unit test workflow for the action scripts (overture-projection-tests.yml).
- Update main workflow to use the reusable-workflows repo, add conditional input handling for dispatch vs PR runs, and simplify header comments (overture-projection.yml).
- README updates: clarify per-file context cap default (max-context-file-chars) and reference the reusable workflow commit.
These changes improve cross-platform robustness, error handling, and CI ergonomics.
Signed-off-by: John McCall <john@overturemaps.org>
* Update action.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Update overture-projection.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Update action.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Update overture-projection.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Add concurrency, secure secrets, and permissions
Enable single active run per PR with a concurrency group and cancel-in-progress behavior; move write/read permissions for PRs, issues, and models to the job scope and keep only contents: read at top-level. Improve secrets handling in the action: add explanatory masks for template-expanded inputs and set checkout persist-credentials: false to avoid leaking tokens to the checked-out workspace. Add inline justifications for unpinned action usage and org secrets usage for reviewers.
Signed-off-by: John McCall <john@overturemaps.org>
* Update workflows: annotations, concurrency, checkout
Add zizmor lint ignore annotations in the overture-projection action to suppress template-injection/unpinned-uses warnings for intentional literal values and local script usage. Enable concurrency in the test workflow to cancel in-progress test runs for the same PR/run, and set actions/checkout persist-credentials: false in the tests job to avoid leaving credentials in the workspace. Tidy comments in the main workflow's uses/secret entries by moving lint ignores inline.
Signed-off-by: John McCall <john@overturemaps.org>
* Update action.yml
Signed-off-by: John McCall <john@overturemaps.org>
* Update action.yml
Signed-off-by: John McCall <john@overturemaps.org>
---------
Signed-off-by: John McCall <john@overturemaps.org>1 parent b031ec9 commit 6097f79
25 files changed
Lines changed: 4102 additions & 0 deletions
File tree
- .github
- actions/overture-projection
- scripts
- lib
- __tests__
- workflows
| 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 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
0 commit comments