Skip to content

Add simplified Issue Ops guide with label restrictions and updated syntax#997

Merged
pelikhan merged 10 commits intomainfrom
copilot/fix-7fa5cc20-23b7-4071-8cb5-54e1008ac02c
Sep 25, 2025
Merged

Add simplified Issue Ops guide with label restrictions and updated syntax#997
pelikhan merged 10 commits intomainfrom
copilot/fix-7fa5cc20-23b7-4071-8cb5-54e1008ac02c

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 25, 2025

This PR adds a streamlined Issue Ops guide to the documentation, demonstrating how to implement automated issue management using GitHub Agentic Workflows with issue created triggers and add-labels safe outputs.

Overview

Issue Ops transforms GitHub issues into powerful automation triggers, enabling intelligent workflows that automatically analyze, categorize, and respond to issues as they're created. This guide provides focused implementation patterns for building secure, automated issue labeling systems with proper restrictions and current API syntax.

Key Features

Issue Created Triggers: Shows how to configure workflows that activate automatically when new issues are opened using on: issues: types: [opened].

Add-Labels Safe Outputs: Demonstrates secure automated labeling through safe-outputs: add-labels: configuration, which handles label assignment in separate jobs with appropriate permissions.

Label Restrictions: Shows how to specify which labels the AI model is allowed to add using the allowed parameter for enhanced security and control.

Updated Syntax: Uses the current needs.activation.outputs.text syntax for accessing sanitized issue content instead of the deprecated needs.task.outputs.text.

Security Architecture: Uses minimal permissions (contents: read, actions: read) for the main AI job while safe outputs handle write operations securely.

Content Structure

The simplified guide includes:

  • Core concepts explaining how Issue Ops works
  • Security best practices using safe outputs and sanitized context access
  • Focused example demonstrating automated bug report triage with restricted labeling
  • Current API syntax for accessing issue context

Example Workflow

---
on:
  issues:
    types: [opened]
permissions:
  contents: read
  actions: read
safe-outputs:
  add-labels:
    allowed: [bug, needs-info, enhancement, question, documentation]  # Restrict to specific labels
    max: 2                                                            # Maximum 2 labels per issue
---

# Bug Report Triage

Analyze new issues to identify bug reports and automatically add appropriate labels.

Based on your analysis:
- If the issue appears to be a bug report, add the "bug" label
- If it's missing key information, also add the "needs-info" label
- For feature requests, add the "enhancement" label
- For questions or documentation issues, use the "question" or "documentation" labels

You can only add labels from the allowed list and a maximum of 2 labels per issue.

Use the issue content: "${{ needs.activation.outputs.text }}"

Benefits

  • Controlled Automation: Label restrictions prevent inappropriate or arbitrary labels
  • Security: Minimal permissions with safe outputs architecture
  • Consistency: Predefined label sets ensure uniform issue categorization
  • Current API Compatibility: Uses updated needs.activation.outputs.text syntax
  • Flexibility: Configurable restrictions and maximum limits

The guide enables repository maintainers to create intelligent issue labeling systems with proper security controls, restrictions, and current API compatibility.

Original prompt

Add issueops guide in the docs.

Use the issue created trigger and add-comment safe output.

title is "Issue Ops"


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits September 25, 2025 01:59
…comment safe output

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…view feedback

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add issueops guide in the docs. Use the issue created trigger and add-comment safe output. title is "Issue Ops" Add Issue Ops guide in the docs Sep 25, 2025
Copilot AI requested a review from pelikhan September 25, 2025 02:02

This workflow creates an intelligent issue triage system that automatically responds to new issues with contextual guidance and assistance.

## Key Benefits of Issue Ops
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove section

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the "Key Benefits of Issue Ops" section as requested. The guide now flows directly from the introduction to the Safe Output Architecture section. Commit: 6b8b94c

contents: read
actions: read
safe-outputs:
add-comment:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use add-labels for this example @copilot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated the bug report triage example to use add-labels instead of add-comment. The example now shows how to automatically add "bug" and "needs-info" labels to issues. Commit: 6b8b94c

If the issue has sufficient detail, acknowledge it as a properly formatted bug report and indicate next steps.
```

### Feature Request Classification
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove the rest of the page, keep it simple

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed all content after the bug report triage section to keep the guide simple and focused. The guide now contains just the core concepts and one practical example. Commit: 6b8b94c

… use add-labels example, keep content concise

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add Issue Ops guide in the docs Add simplified Issue Ops guide in the docs Sep 25, 2025
Copilot AI requested a review from pelikhan September 25, 2025 02:25
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot revert JavaScript changes

… commits

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 25, 2025

@copilot revert JavaScript changes

Reverted all JavaScript changes in pkg/workflow/js/ files that were accidentally included in the previous commits. The files are now back to their original state before my changes. All tests pass and build succeeds. Commit: 91f6e97

Comment thread docs/src/content/docs/guides/issueops.md
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and update the syntax of needs.task to needs.activation

… output

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add simplified Issue Ops guide in the docs Add simplified Issue Ops guide in the docs with label restrictions Sep 25, 2025
Copilot AI requested a review from pelikhan September 25, 2025 11:23
…c02c

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot revert JavaScript files

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 25, 2025

@copilot merge main and update the syntax of needs.task to needs.activation

Merged main branch and updated the syntax from needs.task.outputs.text to needs.activation.outputs.text in the Issue Ops guide. The guide now uses the current API syntax for accessing sanitized issue content:

# Updated syntax:
Analyze this issue: "${{ needs.activation.outputs.text }}"

All tests pass and build succeeds with the updated syntax. Commit: 9f8a42b

Copilot AI changed the title Add simplified Issue Ops guide in the docs with label restrictions Add simplified Issue Ops guide with label restrictions and updated syntax Sep 25, 2025
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 25, 2025

@copilot revert JavaScript files

The JavaScript files are already in their clean state. I verified that the current working tree is clean and matches the previous successful JavaScript revert (commit 5e54629). All tests pass and the build succeeds. No additional revert action was needed as the files are already correct.


Issue Ops workflows activate automatically when new issues are created in your repository. The AI agent analyzes the issue content, applies your defined logic, and provides intelligent responses through automated comments.

```yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot this is a markdown code region

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the markdown formatting by separating the YAML frontmatter from the markdown content. The workflow example now properly uses separate code blocks:

# YAML frontmatter section
# Markdown workflow content

This provides better syntax highlighting and readability. Commit: 6ba8c3f


### Automated Bug Report Triage

```yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot markdown

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the markdown formatting by separating the YAML frontmatter from the markdown content in the bug report triage example. The workflow content is now properly marked as markdown instead of being mixed within the yaml block. Commit: 6ba8c3f

…m markdown content

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add simplified Issue Ops guide with label restrictions and updated syntax Add simplified Issue Ops guide with label restrictions, updated syntax, and proper markdown formatting Sep 25, 2025
Copilot AI requested a review from pelikhan September 25, 2025 11:47
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot revert last commit

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 25, 2025

@copilot revert last commit

Reverted the last commit that separated YAML and markdown content into different code blocks. The workflow examples now use the original format where the YAML frontmatter and markdown content are within the same code block. All functionality remains intact. Commit: a7f9c8e

Copilot AI changed the title Add simplified Issue Ops guide with label restrictions, updated syntax, and proper markdown formatting Add simplified Issue Ops guide with label restrictions and updated syntax Sep 25, 2025
@pelikhan pelikhan marked this pull request as ready for review September 25, 2025 11:56
@pelikhan pelikhan merged commit c546258 into main Sep 25, 2025
@pelikhan pelikhan deleted the copilot/fix-7fa5cc20-23b7-4071-8cb5-54e1008ac02c branch September 25, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants