Skip to content

Adapt instructions based on trigger type #172

Description

@mintybasil

yoke/src/runner.rs

Lines 55 to 65 in dc47167

fn build_instructions(workflow: &Workflow, workspace_dir: &Path) -> Option<String> {
if workflow.git.clone || workflow.git.worktree {
let path = workspace_dir.to_string_lossy();
Some(format!(
"All work is in: {}. Always run `cd {}` as your first action before any file or terminal operations. Reference all file paths relative to this directory.",
path, path
))
} else {
None
}
}

Currently we specify the same instructions field for the agent regardless of trigger type, and only if git.clone/git.workspace are enabled. As shown in #171 this can be problematic, and may not apply for some triggers.

We should refactor this is use trigger-specific values. Further investigation is required to determine what instructions should be used for which triggers.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions