Commit e69a146
authored
π fix: checkout PR head SHA for issue_comment triggered workflows (llm-d#832)
* π fix: checkout PR head SHA for issue_comment triggered workflows
When /trigger-e2e-full is used on a PR, the workflow is triggered via
issue_comment event. For this event type, github.sha points to the
default branch (main), not the PR head. This caused e2e-tests and
lint-and-test jobs to build/test main instead of the PR changes.
Fix:
- Export pr_head_sha from check-code-changes job (already computed)
- e2e-tests: use pr_head_sha output in checkout (already depends on check-code-changes)
- lint-and-test: add PR info step to resolve head SHA for issue_comment events
- When ref is empty string, actions/checkout falls back to default behavior (correct for pull_request events)
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
* chore: re-trigger CI checks
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
* π fix: address copilot review - security gates for issue_comment events
- Skip lint-and-test for issue_comment events (already runs on pull_request)
- Remove duplicated PR head SHA resolution from lint-and-test
- Tighten e2e-tests gate: issue_comment only runs when check-full-tests
validates an approved trigger from a trusted collaborator
- Explicitly handle workflow_dispatch and pull_request event types
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
* π fix: address round 2 copilot review
- Restore workflow_dispatch smoke-test path (run_full OR has_code_changes)
- Require check-code-changes success for issue_comment e2e runs
- Add explicit validation step to fail fast if pr_head_sha is empty
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
---------
Signed-off-by: Andrew Anderson <andy@clubanderson.com>1 parent affba38 commit e69a146
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
250 | 254 | | |
251 | 255 | | |
252 | 256 | | |
253 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
254 | 266 | | |
255 | 267 | | |
256 | 268 | | |
257 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
258 | 279 | | |
259 | 280 | | |
| 281 | + | |
| 282 | + | |
260 | 283 | | |
261 | 284 | | |
262 | 285 | | |
| |||
0 commit comments