Commit 92cb8bb
authored
ci: comment a run-anywhere command to try the PR template artifact (#491)
* ci: comment a run-anywhere command to try the PR template artifact
The PR Template Artifact job builds a scaffold with this PR's SDK tarballs
but leaves it in the artifacts UI with no obvious way to consume it. Add a
sticky PR comment that prints a self-contained command — gh run download of
this run's artifact, unzip, then databricks apps init --template — with the
run id, repo, artifact name, and output dir all baked in, so it can be pasted
into any folder without a repo checkout.
Reuses the existing github-script + marker-based upsert pattern (bundle-size,
breaking-change). Adds job-level pull-requests: write for the comment.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
* ci: restore id-token permission on pr-template-artifact job
Job-level permissions replace the top-level set rather than merging, so
adding pull-requests: write dropped the top-level id-token: write that
setup-jfrog-npm needs for its OIDC token (ACTIONS_ID_TOKEN_REQUEST_TOKEN
unbound). List all three at the job level.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
* ci: skip try-template comment on fork PRs
Fork PRs get a read-only GITHUB_TOKEN, so the github-script upsert would
403 and fail the whole pr-template-artifact job for an author who can't
fix it. Guard the comment step with the same head-repo check bundle-size.yml
and eval-pr-comment.yml already use.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
* ci: merge eval link and template command into one PR comment
Combine the evals-monitor link and the try-this-template command into a
single sticky comment with two delimited sections instead of two separate
comments. Add a shared upsert-pr-comment-section.cjs helper: each workflow
owns one section id and rewrites only its block, preserving the other's
content (a push reruns the template section without wiping the eval link).
The two writers are separated in time — the eval link posts instantly on PR
open, the template command posts after the ~5-min build — so concurrent
writes to the shared comment don't occur. Bundle-size and breaking-change
comments are intentionally left separate for now.
Replaces the single-purpose upsert-template-artifact-comment.cjs and
rewires eval-pr-comment.yml onto the shared helper.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
* ci: fold eval link into the template artifact comment
Drop the separate Eval PR Comment workflow and the section-merge helper;
the pr-template-artifact job now posts a single comment containing both the
evals-monitor link and the run-anywhere template command. One writer, one
comment, plain marker-based upsert — no cross-workflow coordination.
Tradeoff: the eval link now rides the ~5-min build and is skipped on
docs-only PRs (where the artifact job doesn't run and evals are moot),
instead of posting instantly on every PR open.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
* ci: give the PR-bot comment a header and parallel section titles
Add an overall '🤖 AppKit PR bot' header and a '### 🔬 Run evals' title so the
evals link matches the template section's heading instead of being a bare
blockquote.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
---------
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Co-authored-by: MarioCadenas <MarioCadenas@users.noreply.github.com>1 parent 1286fab commit 92cb8bb
3 files changed
Lines changed: 101 additions & 60 deletions
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
| |||
226 | 233 | | |
227 | 234 | | |
228 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
229 | 285 | | |
230 | 286 | | |
231 | 287 | | |
| |||
This file was deleted.
0 commit comments