[evoskill] Refine developer skill with cross-trigger nullability guards for generated if: expressions - #49472
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
if: expressions
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. Hey Here's what looks great:
A couple of things to finalize before merge:
Once final verification is done and the checklist is fully green, this should be ready for merge.
|
There was a problem hiding this comment.
Pull request overview
Adds guidance for safely generating cross-trigger GitHub Actions conditions.
Changes:
- Documents trigger and parent-object null guards.
- Adds safe/unsafe examples and a verification checklist.
- Missing guidance against unsupported arithmetic operators.
Show a summary per file
| File | Description |
|---|---|
.github/skills/developer/SKILL.md |
Adds cross-trigger condition-generation guidance. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
| - Guard every trigger-specific object chain (`github.event.pull_request.*`, `github.event.issue.*`, etc.) with `github.event_name` checks. | ||
| - Add nullability guards for each parent object in the chain before accessing deeper properties. | ||
| - For workflows with multiple triggers, ensure every trigger path either short-circuits safely or avoids unsupported fields entirely. | ||
| - Prefer conservative composition (`A && B && C`) where early terms validate event type/object existence before nested access. |
|
🎉 This pull request is included in a new release. Release: |
A recent regression class showed that generated GitHub Actions conditions can fail at expression-evaluation time when nested
github.event.*fields are referenced on incompatible triggers (for example, PR-only fields onpush/schedule). This update strengthens thedeveloperskill so future workflow-generation changes consistently guard cross-trigger nullability.Security Best Practices → new guidance section
.github/skills/developer/SKILL.md(additive only; existing content unchanged).if:expressions (not runtime shell logic).Unsafe vs safe generation pattern
startup_failurebefore jobs run) when parent event objects are absent.github.event_nametrigger gatingOperational checklist for reviewers/authors