-
Notifications
You must be signed in to change notification settings - Fork 375
Add simplified Issue Ops guide with label restrictions and updated syntax #997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
86edc40
fdc1c0e
8f66ba8
7a0563c
5e54629
affc519
80e567c
ed0ef8c
12e531d
59b93f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| --- | ||
| title: Issue Ops | ||
| description: Learn how to implement Issue Ops workflows using GitHub Agentic Workflows with issue created triggers and automated comment responses for streamlined issue management. | ||
| --- | ||
|
|
||
| Issue Ops is a practice that transforms GitHub issues into powerful automation triggers. Instead of manual triage and responses, you can create intelligent workflows that automatically analyze, categorize, and respond to issues as they're created. | ||
|
|
||
| GitHub Agentic Workflows makes Issue Ops natural through issue creation triggers and safe comment outputs that handle automated responses securely without requiring write permissions for the main AI job. | ||
|
|
||
| ## How Issue Ops Works | ||
|
|
||
| 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 | ||
| --- | ||
| on: | ||
| issues: | ||
| types: [opened] | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| safe-outputs: | ||
| add-comment: | ||
| max: 2 | ||
| --- | ||
|
|
||
| # Issue Triage Assistant | ||
|
|
||
| When a new issue is created, analyze the issue content and provide helpful guidance. | ||
|
|
||
| Examine the issue title and description for: | ||
| - Bug reports that need additional information | ||
| - Feature requests that should be categorized | ||
| - Questions that can be answered immediately | ||
| - Issues that might be duplicates | ||
|
|
||
| Respond with a helpful comment that guides the user on next steps or provides immediate assistance. | ||
| ``` | ||
|
|
||
| This workflow creates an intelligent issue triage system that automatically responds to new issues with contextual guidance and assistance. | ||
|
|
||
| ## Safe Output Architecture | ||
|
|
||
| Issue Ops workflows use the `add-comment` safe output to ensure secure comment creation: | ||
|
|
||
| ```yaml | ||
| safe-outputs: | ||
| add-comment: | ||
| max: 3 # Optional: allow multiple comments (default: 1) | ||
| target: "triggering" # Default: comment on the triggering issue/PR | ||
| ``` | ||
|
|
||
| **Security Benefits**: | ||
| - Main job runs with minimal `contents: read` permissions | ||
| - Comment creation happens in a separate job with appropriate `issues: write` permissions | ||
| - Automatic sanitization of AI-generated content | ||
| - Built-in limits prevent comment spam | ||
|
|
||
| ## Accessing Issue Context | ||
|
|
||
| Issue Ops workflows have access to sanitized issue content through the `needs.activation.outputs.text` variable: | ||
|
|
||
| ```yaml | ||
| # In your workflow instructions: | ||
| Analyze this issue: "${{ needs.activation.outputs.text }}" | ||
| ``` | ||
|
|
||
| The sanitized context provides: | ||
| - Issue title and description combined | ||
| - Filtered content that removes security risks | ||
| - @mention neutralization to prevent unintended notifications | ||
| - URI filtering for trusted domains only | ||
|
|
||
| **Security Note**: While sanitization reduces risks, always treat user content as potentially untrusted and design workflows to be resilient against prompt injection attempts. | ||
|
|
||
| ## Common Issue Ops Patterns | ||
|
|
||
| ### Automated Bug Report Triage | ||
|
|
||
| ```yaml | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| --- | ||
| on: | ||
| issues: | ||
| types: [opened] | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| safe-outputs: | ||
| add-labels: | ||
|
pelikhan marked this conversation as resolved.
|
||
| 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. | ||
|
|
||
| Look for: | ||
| - Steps to reproduce | ||
| - Expected vs actual behavior | ||
| - Environment information (OS, browser, version) | ||
| - Error messages or stack traces | ||
|
|
||
| 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. | ||
| ``` | ||
|
|
||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 contentThis provides better syntax highlighting and readability. Commit: 6ba8c3f