Skip to content

Commit 522d4cc

Browse files
Copilotpelikhan
andcommitted
Use parsed Command field for detecting comment triggers
- Check data.Command field from parsed frontmatter - Command triggers expand to comment events (issue_comment, etc.) - Simplify logic by checking Command first before parsing On string - Improve accuracy of comment trigger detection - All tests pass with updated logic Co-authored-by: pelikhan <[email protected]>
1 parent 0e827b1 commit 522d4cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎pkg/workflow/pr.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ func (c *Compiler) generatePRContextPromptStep(yaml *strings.Builder, data *Work
6565

6666
// hasCommentRelatedTriggers checks if the workflow has any comment-related event triggers
6767
func (c *Compiler) hasCommentRelatedTriggers(data *WorkflowData) bool {
68+
// Check for command trigger (which expands to comment events)
69+
if data.Command != "" {
70+
return true
71+
}
72+
6873
if data.On == "" {
6974
return false
7075
}

0 commit comments

Comments
 (0)