Skip to content

Comments

[instructions] Sync github-agentic-workflows.md with v0.40.1#17622

Merged
pelikhan merged 1 commit intomainfrom
instructions/sync-v0.40.1-4abff7db6cf88b1a
Feb 22, 2026
Merged

[instructions] Sync github-agentic-workflows.md with v0.40.1#17622
pelikhan merged 1 commit intomainfrom
instructions/sync-v0.40.1-4abff7db6cf88b1a

Conversation

@github-actions
Copy link
Contributor

Instructions Update - Synchronized with v0.40.1

This PR updates the github-agentic-workflows.md file based on safe-outputs code audit against the current codebase (v0.40.1).

Changes Made

  • Add safe-outputs.jobs: Document custom safe-output jobs for third-party integrations (Slack, Discord, external APIs). This was a significant undocumented feature.
  • create-discussion: Add expires field (auto-close after period) and fallback-to-issue field (fall back to issue on permission errors).
  • create-pull-request: Add fallback-as-issue field (default: true; set false to disable issue fallback when PR creation fails).
  • add-comment: Add discussions field (set false to exclude discussions:write permission); deprecate discussion flag.
  • 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: Add commit-title-suffix and staged fields.
  • close-pull-request: Add github-token field.
  • noop: Add report-as-issue field.
  • Breaking Changes: Add deprecation notice for safe-outputs.add-comment.discussion flag with codemod add-comment-discussion-removal.
  • Migration Tools: Add add-comment-discussion-removal codemod to the list.

Documentation Commits Reviewed

  • 898cf58 Copilot/update parser log javascript (not docs-related)

Validation

  • Followed prompting best practices (imperative mood, minimal examples)
  • Maintained technical tone and brevity
  • Updated only necessary sections
  • Verified accuracy against current codebase (pkg/workflow/safe_outputs_config.go, pkg/parser/schemas/main_workflow_schema.json, pkg/workflow/add_comment.go, pkg/workflow/hide_comment.go)
  • Removed outdated or redundant content

Generated by Instructions Janitor

  • expires on Feb 23, 2026, 11:59 PM UTC

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added automation documentation Improvements or additions to documentation labels Feb 21, 2026
@github-actions
Copy link
Contributor Author

✅ Pull request created: #17622

@pelikhan pelikhan marked this pull request as ready for review February 22, 2026 00:02
Copilot AI review requested due to automatic review settings February 22, 2026 00:02
@pelikhan pelikhan merged commit 56ea618 into main Feb 22, 2026
@pelikhan pelikhan deleted the instructions/sync-v0.40.1-4abff7db6cf88b1a branch February 22, 2026 00:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.discussion including the add-comment-discussion-removal codemod.

💡 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)
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
staged: true # Optional: preview mode (default: follows global staged)
staged: true # Optional: preview mode

Copilot uses AI. Check for mistakes.
safe-outputs:
assign-to-agent:
name: "copilot" # Optional: agent name
model: "claude-sonnet-4-5" # Optional: model override
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
model: "claude-sonnet-4-5" # Optional: model override
model: "claude-sonnet-4.5" # Optional: model override

Copilot uses AI. Check for mistakes.
Comment on lines 444 to +447
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)
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation documentation Improvements or additions to documentation instructions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant