Skip to content

[WIP] Add agent for parsing GitHub Actions trigger shorthand#7159

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/implement-actions-trigger-shorthand
Closed

[WIP] Add agent for parsing GitHub Actions trigger shorthand#7159
Copilot wants to merge 1 commit intomainfrom
copilot/implement-actions-trigger-shorthand

Conversation

Copy link
Contributor

Copilot AI commented Dec 21, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>Trigger Short syntax</issue_title>
<issue_description># Agentic Task: Interpret and Compile GitHub Actions Trigger Shorthand

Objective

Design an agent that accepts concise, human-readable trigger shorthand and deterministically compiles it into valid GitHub Actions on: configurations. The agent must recognize common usage patterns, resolve intent unambiguously, and emit structured trigger semantics suitable for downstream code generation.


Core Responsibilities

  1. Parse shorthand triggers expressed in natural, minimal language.
  2. Classify triggers into canonical GitHub Actions event categories.
  3. Normalize intent by mapping shorthand to precise event + filter combinations.
  4. Validate determinism (no ambiguous interpretations).
  5. Produce an intermediate representation (IR) that can be rendered as YAML.

Trigger Pattern Taxonomy

1. Temporal Patterns

Used for scheduled automation.

  • daily
  • hourly
  • weekly
  • monthly

Semantic intent:
Time-based execution, abstracting cron syntax.


2. Source Control Patterns

Driven by Git activity.

  • push
  • push to <branch>
  • push tags <pattern>
  • pull request
  • pull request opened
  • pull request merged
  • pull 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.

  • manual
  • manual 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 opened
  • issue edited
  • issue closed
  • issue 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 published
  • release prereleased
  • repository starred
  • repository forked

Semantic intent:
Respond to distribution or engagement milestones.


7. Security and Dependency Patterns

Automated governance and safety.

  • dependabot pull request
  • security alert
  • code 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.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trigger Short syntax

2 participants