OpenCoze
Back to template library

Automated GitHub Issue Triage with Copilot SDK

DevelopmentCozeUpdated 2026-03-25

When a new GitHub issue is created, automatically use the Copilot SDK to generate a summary, suggest labels, and comment on the issue, boosting developer productivity.

System Prompt
Generate a concise summary and a list of suggested labels for GitHub issue {issue_id} in repository {repo_name}. Issue title: {issue_title}. Issue body: {issue_body}. Output JSON with fields: summary, labels, comment. If the SDK fails, output a fallback comment explaining the issue.

Variable Dictionary (fill in your AI tool)

This section only explains placeholders. It is not an input form on this website. Copy the prompt, then replace variables in Coze / Dify / ChatGPT.

{issue_id}

Unique identifier of the GitHub issue

Filling hint: replace this with your real business context.

{repo_name}

Repository name, e.g., owner/repo

Filling hint: replace this with your real business context.

{issue_title}

Title of the issue

Filling hint: replace this with your real business context.

{issue_body}

Body text of the issue

Filling hint: replace this with your real business context.

Quick Variable Filler (Optional)

Fill variables below to generate a ready-to-run prompt in your browser.

{issue_id}

Unique identifier of the GitHub issue

{repo_name}

Repository name, e.g., owner/repo

{issue_title}

Title of the issue

{issue_body}

Body text of the issue

Generated Prompt Preview

Missing: 4
Generate a concise summary and a list of suggested labels for GitHub issue {issue_id} in repository {repo_name}. Issue title: {issue_title}. Issue body: {issue_body}. Output JSON with fields: summary, labels, comment. If the SDK fails, output a fallback comment explaining the issue.

How to Use This Template

Best for

Teams that need faster development output with more stable prompt quality.

Problem it solves

Reduces blank-page time, missing constraints, and inconsistent output structure from ad-hoc prompting.

Steps

  1. Copy the template prompt.
  2. Paste it into your AI tool (Coze / Dify / ChatGPT).
  3. Replace placeholder variables using the dictionary above.
  4. Run and refine constraints based on output quality.

Not ideal when

You need live web retrieval, database writes, or multi-step tool orchestration. Use full workflow automation for that.

Success Case

Input:
issue_id: 1234 repo_name: octocat/Hello-World issue_title: "Bug: Unexpected crash on launch" issue_body: "When launching the app, it crashes with error code 0xDEADBEEF. Steps to reproduce: 1. Open app 2. Click on Settings 3. Crash."
Output:
{ "summary": "App crashes on Settings page with error 0xDEADBEEF.", "labels": ["bug", "high-priority"], "comment": "Issue 1234: The app crashes on the Settings page. Suggested labels: bug, high-priority." }

Boundary Case

Input:
issue_id: 5678 repo_name: octocat/Hello-World issue_title: "Feature: Add dark mode" issue_body: "Users request dark mode. Implement by adding CSS variables."
Fix:
Ensure Copilot SDK endpoint is reachable and retry after a short delay. If persistent, fall back to keyword-based summary.

What to Try Next

Keep exploring with similar templates and matching tools.

Continue Where You Left Off

No recent items yet.

Workflow Steps

  1. 1. Trigger via GitHub webhook or API to capture issue_id, repo_name, issue_title, issue_body.

  2. 2. Call the Copilot SDK issue processing endpoint with the captured variables and receive a JSON response.

  3. 3. Parse the response to extract summary, labels, and comment.

  4. 4. Use the GitHub API to update the issue: add the suggested labels and post the comment.

  5. 5. Cache the response in Redis or a file system for future reference.

  6. 6. If the SDK call fails, execute the fallback logic in step 4 using keyword matching to generate a simple comment.

Constraints

  • Issue body exceeds 4000 characters; truncate to 4000 chars before sending to SDK
  • Network timeout when calling Copilot SDK; trigger fallback logic
  • Missing or invalid GitHub token; abort operation and log error

Explore More in This Category

Development

Recommended Stack

Tools that work well with this template.

Coze

Official site

Low-code agent workflow platform for fast automation delivery.

Open

OpenAI

Official site

General LLM platform for generation, analysis, and development use cases.

Open