factory-complete-issue

Marks a GitHub issue as done and updates its status labels via gh CLI.

27.6k|2.7k|Updated Aug 6, 2024
One-click install
npx skills add https://github.com/mastra-ai/mastra --skill factory-complete-issue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: factory-complete-issue
Source: https://github.com/mastra-ai/mastra/tree/main/mastracode/factory/factory-skills/factory-complete-issue
Command: npx skills add https://github.com/mastra-ai/mastra --skill factory-complete-issue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

After completing a Factory work item, teams need a consistent way to signal completion on the linked GitHub issue without manually editing labels or posting status comments. This Skill automates that final bookkeeping step.

Core Features & Use Cases

  • Label cleanup: Removes triage labels (status: needs triage, status: auto-triaged, status: needs approval) from the issue using gh issue edit.
  • Completion signaling: Adds the status: pending-close label and posts a "This issue has now been marked as done." comment on open issues.
  • Closed-issue safety: Skips label additions and comments when the issue is already closed, and never closes, reopens, or assigns the issue.
  • Use Case: After finishing a bug fix tracked by a Factory work item, run this Skill with the issue URL to automatically clear triage labels and mark the issue as pending close.

Quick Start

Mark the GitHub issue at the given URL as done by removing its triage labels and adding the pending-close status.

Frequently Asked Questions about factory-complete-issue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I mark a GitHub issue as done from the command line?

Use the gh CLI to edit issue labels and post comments. This Skill removes triage labels like `status: needs triage`, adds `status: pending-close` to open issues, and posts a completion comment automatically.

How to remove labels from a GitHub issue with gh CLI?

Use `gh issue edit` with the remove-label flag to strip specific labels such as `status: needs triage` or `status: auto-triaged`. The Skill first reads current labels so only present ones are removed.

Does this Skill close the GitHub issue after completion?

No, it never closes, reopens, or assigns the issue. It only adds the `status: pending-close` label and a completion comment on open issues, leaving the actual close decision to maintainers.

What happens if the GitHub issue is already closed?

If the issue is already closed, the Skill skips adding the `status: pending-close` label and does not post the completion comment. It still removes any listed triage labels that are present.

Can I pass an issue number instead of a full URL?

Yes, the Skill parses either an issue URL or an issue number from the provided arguments. It then reads the issue's current state and labels before making any edits.