[instructions] Sync github-agentic-workflows.md with v0.40.1#17622
[instructions] Sync github-agentic-workflows.md with v0.40.1#17622
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
✅ Pull request created: #17622 |
There was a problem hiding this comment.
Pull request overview
Updates the agentic workflows instruction documentation to reflect newer safe-output configuration options and deprecations.
Changes:
- Document additional
safe-outputs.*fields (e.g., discussion/PR fallbacks, permissions toggles, token overrides, agent assignment options). - Add documentation for custom safe-output jobs via
safe-outputs.jobs. - Add deprecation + migration guidance for
safe-outputs.add-comment.discussionincluding theadd-comment-discussion-removalcodemod.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| labels: [automated] # Optional: require all labels | ||
| if-no-changes: "warn" # Optional: "warn" (default), "error", or "ignore" | ||
| commit-title-suffix: "[auto]" # Optional: suffix appended to commit title | ||
| staged: true # Optional: preview mode (default: follows global staged) |
There was a problem hiding this comment.
push-to-pull-request-branch.staged is documented here as “default: follows global staged”, but the compiler currently only uses the top-level safe-outputs.staged flag when setting GH_AW_SAFE_OUTPUTS_STAGED (per-output staged values aren’t consulted). Either remove the per-output default claim from the docs, or implement per-output staged behavior in compilation so this field actually overrides/inherits as described.
| staged: true # Optional: preview mode (default: follows global staged) | |
| staged: true # Optional: preview mode |
| safe-outputs: | ||
| assign-to-agent: | ||
| name: "copilot" # Optional: agent name | ||
| model: "claude-sonnet-4-5" # Optional: model override |
There was a problem hiding this comment.
The example model name claude-sonnet-4-5 doesn’t match the documented/known model naming format used elsewhere (e.g. schema examples use claude-sonnet-4.5, claude-opus-4.6, etc.). Consider updating the example to a valid model identifier to prevent copy/paste misconfiguration.
| model: "claude-sonnet-4-5" # Optional: model override | |
| model: "claude-sonnet-4.5" # Optional: model override |
| expires: 7 # Optional: auto-close after 7 days (supports: 2h, 7d, 2w, 1m, 1y; min: 2h) | ||
| auto-merge: false # Optional: enable auto-merge when checks pass (default: false) | ||
| base-branch: "vnext" # Optional: base branch for PR (defaults to workflow's branch) | ||
| fallback-as-issue: false # Optional: create issue if PR creation fails (default: true) |
There was a problem hiding this comment.
In the current compiler implementation, create-pull-request.expires only converts string values (e.g. "7d") to hours; an integer like expires: 7 is unmarshaled as 7 and then treated as hours, even though the schema/docs describe integer values as days. To avoid misleading users, either update the docs example/description to recommend using the string form (7d) for days, or update parsePullRequestsConfig to normalize integer values to hours the same way create-issue/create-discussion do.
See below for a potential fix:
expires: 7d # Optional: auto-close after 7 days (recommended: use string form like 7d; integers are treated as hours)
auto-merge: false # Optional: enable auto-merge when checks pass (default: false)
base-branch: "vnext" # Optional: base branch for PR (defaults to workflow's branch)
fallback-as-issue: false # Optional: create issue if PR creation fails (default: true)
target-repo: "owner/repo" # Optional: cross-repository
```
**Auto-Expiration**: The `expires` field auto-closes PRs after a time period. Use relative string formats like `2h`, `7d`, `2w`, `1m`, or `1y` (recommended). Note that bare integers are interpreted as hours in the current implementation. Minimum duration: 2 hours. Only for same-repo PRs without target-repo. Generates `agentics-maintenance.yml` workflow.
Instructions Update - Synchronized with v0.40.1
This PR updates the
github-agentic-workflows.mdfile based on safe-outputs code audit against the current codebase (v0.40.1).Changes Made
safe-outputs.jobs: Document custom safe-output jobs for third-party integrations (Slack, Discord, external APIs). This was a significant undocumented feature.create-discussion: Addexpiresfield (auto-close after period) andfallback-to-issuefield (fall back to issue on permission errors).create-pull-request: Addfallback-as-issuefield (default: true; set false to disable issue fallback when PR creation fails).add-comment: Adddiscussionsfield (set false to exclude discussions:write permission); deprecatediscussionflag.assign-to-agent: Add undocumented fields:model,custom-agent,custom-instructions,pull-request-repo,allowed-pull-request-repos,base-branch,ignore-if-error.push-to-pull-request-branch: Addcommit-title-suffixandstagedfields.close-pull-request: Addgithub-tokenfield.noop: Addreport-as-issuefield.safe-outputs.add-comment.discussionflag with codemodadd-comment-discussion-removal.add-comment-discussion-removalcodemod to the list.Documentation Commits Reviewed
Validation
pkg/workflow/safe_outputs_config.go,pkg/parser/schemas/main_workflow_schema.json,pkg/workflow/add_comment.go,pkg/workflow/hide_comment.go)