MCPcopy Create free account
hub / github.com/github/gh-aw / hasIssueTrigger

Method hasIssueTrigger

pkg/workflow/tools.go:457–463  ·  view source on GitHub ↗

hasIssueTrigger checks if the workflow has an issue trigger in its 'on' section

(onSection string)

Source from the content-addressed store, hash-verified

455
456// hasIssueTrigger checks if the workflow has an issue trigger in its 'on' section
457func (c *Compiler) hasIssueTrigger(onSection string) bool {
458 hasIssue := strings.Contains(onSection, "issues:") ||
459 strings.Contains(onSection, "issue:") ||
460 strings.Contains(onSection, "issue_comment:")
461 toolsLog.Printf("Checking for issue trigger: has_issue=%t", hasIssue)
462 return hasIssue
463}
464
465// injectWorkflowDispatchForIssue adds workflow_dispatch trigger with issue_number input
466func (c *Compiler) injectWorkflowDispatchForIssue(onSection string) string {

Callers 3

applyDefaultsMethod · 0.95
generateYAMLMethod · 0.95

Calls 1

PrintfMethod · 0.45

Tested by 1