-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Extend the short form "on" syntax parser with , human-readable trigger shorthand and deterministically compiles it into valid GitHub Actions on: configurations. The parser/compiler must recognize common usage patterns, resolve intent unambiguously, and emit structured trigger semantics suitable for downstream code generation.
Update and unify existing parsers.
Core Responsibilities
- Parse shorthand triggers expressed in natural, minimal language.
- Classify triggers into canonical GitHub Actions event categories.
- Normalize intent by mapping shorthand to precise event + filter combinations.
- Validate determinism (no ambiguous interpretations).
- Produce an intermediate representation (IR) that can be rendered as YAML.
Trigger Pattern Taxonomy
1. Temporal Patterns
Used for scheduled automation.
dailyhourlyweeklymonthly
Semantic intent:
Time-based execution, abstracting cron syntax.
2. Source Control Patterns
Driven by Git activity.
pushpush to <branch>push tags <pattern>pull requestpull request openedpull request mergedpull request affecting <path>
Semantic intent:
React to repository state changes with optional branch, tag, or path filters.
3. Manual Invocation Patterns
Explicit human-triggered workflows.
manualmanual with input <name>workflow completed <workflow>
Semantic intent:
User-initiated or workflow-chained execution.
4. Issue and Discussion Patterns
Workflow automation tied to project management.
issue openedissue editedissue closedissue labeled <label>discussion created
Semantic intent:
React to lifecycle events in issues or discussions, optionally scoped by labels.
5. Comment and Command Patterns
Text-driven control flows.
comment created/<command>/<command> in pull request/<command> by member
Semantic intent:
Parse comment bodies for directives; often permission- or context-scoped.
6. Release and Repository Lifecycle Patterns
High-level repository events.
release publishedrelease prereleasedrepository starredrepository forked
Semantic intent:
Respond to distribution or engagement milestones.
7. Security and Dependency Patterns
Automated governance and safety.
dependabot pull requestsecurity alertcode scanning alert
Semantic intent:
Automate responses to vulnerabilities and automated dependency changes.
8. External Integration Patterns
Triggers initiated outside GitHub.
api dispatch <event>
Semantic intent:
Allow external systems to invoke workflows via custom event payloads.
Determinism Rules
- Each shorthand must map to exactly one GitHub Actions event family.
- Optional qualifiers (branch, label, path, role) must be explicit.
- No shorthand may rely on implicit defaults beyond common GitHub conventions.
Output Expectations
The agent should output:
- A structured trigger IR (event, types, filters, conditions)
- Sufficient metadata to generate valid GitHub Actions YAML
- Clear errors for unsupported or ambiguous patterns
Non-Goals
- Authoring full workflow YAML
- Executing or validating workflows against GitHub APIs
- Supporting undocumented or deprecated GitHub events
Success Criteria
The agent reliably converts shorthand triggers into precise, production-ready trigger definitions with zero ambiguity and minimal user input.