Add shared/gh.md safe-input workflow for gh CLI access#5157
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
|
@copilot apply comment #5157 (comment) |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in b059a64. Changed |
|
|
@copilot change dev.md engine to codex |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
✅ Dev Hawk Report - SuccessWorkflow Run: #3023
SummaryThe Dev workflow completed successfully! 🎉 Commit Message:
This commit switched the engine in 🦅 Automated analysis by Dev Hawk - monitoring workflow completions on copilot/ branches*
|
|
@copilot review the safeinputs MCP server JavaScript code as it seems to the fail to load. Add more test, check file paths, add more tests local. Here is a log: |
The safeinputs MCP server was timing out because environment variables (like GH_TOKEN) defined in safe-inputs were not being passed to the agent execution step. This caused codex to start the MCP server without access to the required environment variables. Changes: - Add safe-inputs secrets passthrough in Codex engine (codex_engine.go) - Add safe-inputs secrets passthrough in Copilot engine (copilot_engine.go) - Add safe-inputs secrets passthrough in Claude engine (claude_engine.go) - Add unit test for Codex engine to verify safe-inputs secrets are included Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in 36e0854. The safeinputs MCP server was timing out because environment variables (like GH_TOKEN) defined in safe-inputs were not being passed to the agent execution step. Added safe-inputs secrets passthrough to the Codex, Copilot, and Claude engine execution steps so the MCP server can access the required environment variables when started. |
✅ Dev Hawk Report - SuccessWorkflow Run: #3024
SummaryThe Dev workflow completed successfully! 🎉 What Was FixedThis commit addresses the safe-inputs MCP server startup timeout issue by ensuring environment variables (like Changes Applied:
Commit Details
This automated report is brought to you by Dev Hawk 🦅 - monitoring your workflow runs so you don't have to!
|
|
@copilot gh.md to remove the "safe-input argument from the gh cli call. See error: 2025-12-01T04:54:46.885574Z DEBUG codex_exec: Received event: Event { id: "0", msg: ExecCommandEnd(ExecCommandEndEvent { call_id: "call_RHxPBfYCveAnLxKhuN4TL7oA", turn_id: "0", command: ["/bin/bash", "-lc", "gh safe-input pr list --limit 1 --json number,title,body,author,state,createdAt,mergedAt,url"], cwd: "/home/runner/work/gh-aw/gh-aw", parsed_cmd: [Unknown { cmd: "gh safe-input pr list --limit 1 --json 'number,title,body,author,state,createdAt,mergedAt,url'" }], source: Agent, interaction_input: None, stdout: "", stderr: "unknown command "safe-input" for "gh"\n\nUsage: gh [flags]\n\nAvailable commands:\n agent-task\n alias\n api\n attestation\n auth\n browse\n cache\n co\n codespace\n completion\n config\n extension\n gist\n gpg-key\n issue\n label\n org\n pr\n preview\n project\n release\n repo\n ruleset\n run\n search\n secret\n ssh-key\n status\n variable\n workflow\n\n", aggregated_output: "unknown command "safe-input" for "gh"\n\nUsage: gh [flags]\n\nAvailable commands:\n agent-task\n alias\n api\n attestation\n auth\n browse\n cache\n co\n codespace\n completion\n config\n extension\n gist\n gpg-key\n issue\n label\n org\n pr\n preview\n project\n release\n repo\n ruleset\n run\n search\n secret\n ssh-key\n status\n variable\n workflow\n\n", exit_code: 1, duration: 190.038197ms, formatted_output: "unknown command "safe-input" for "gh"\n\nUsage: gh [flags]\n\nAvailable commands:\n agent-task\n alias\n api\n attestation\n auth\n browse\n cache\n co\n codespace\n completion\n config\n extension\n gist\n gpg-key\n issue\n label\n org\n pr\n preview\n project\n release\n repo\n ruleset\n run\n search\n secret\n ssh-key\n status\n variable\n workflow\n\n" }) } |
…ing passed to gh CLI The agent was incorrectly adding "safe-input" as an argument to gh CLI calls. Simplified the tool description and documentation to be clearer about the expected usage pattern. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
✅ Dev Hawk Report - SuccessWorkflow Run: #3025
SummaryThe Dev workflow completed successfully! 🎉 Commit message: Simplify gh.md safe-input description to prevent "safe-input" from being passed to gh CLI The agent was fixing an issue where "safe-input" was incorrectly being added as an argument to gh CLI calls. The changes simplified the tool description and documentation to clarify the expected usage pattern. Monitored by Dev Hawk 🦅
|
|
@copilot disable github tool in gh.md Remove assign-to-agent |
The gh.md shared workflow only defines safe-inputs, not the github tool. The github MCP server is added automatically by the compiler for all workflows. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Removed Regarding disabling the github tool: The gh.md shared workflow only defines |
- Document the reusable shared/gh.md workflow in safe-inputs reference - Add 'Shared gh CLI Tool' subsection with usage examples - Show how to import and use the gh tool with various commands Related to #5157
shared/gh.mdthat exposes a "gh" safe-input tool to execute any gh CLI commanddev.mdto:shared/gh.md${{ secrets.GITHUB_TOKEN }}to${{ github.token }}for proper gh CLI authentication in GitHub ActionsNote: The github MCP server is added automatically by the compiler for all workflows. The gh.md shared workflow only defines safe-inputs, not the github tool. Disabling the github tool via
github: falseis not currently supported by the schema.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.