这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@joedanz
Copy link
Contributor

@joedanz joedanz commented Aug 28, 2025

Summary

Adds comprehensive GitHub Issues integration to the VibeKit SDK, enabling automated issue creation, updates, and management workflows. This follows the established pattern of existing GitHub operations (createPullRequest, mergePullRequest, pushToBranch) with a minimal 2-command API surface.

What's Added

Core SDK Methods

  • createIssue(options) - Create new GitHub issues with full configuration
  • updateIssue(issueNumber, options) - Update/close existing issues with flexible options

Type Definitions

  • CreateIssueOptions - Options for creating issues (title, body, labels, assignees, milestone)
  • UpdateIssueOptions - Options for updating issues (all fields optional, supports state changes)
  • IssueResult - Complete issue response type with GitHub API data

Key Features

  • Minimal API surface - Just 2 commands for full functionality
  • No agent required - Like PR operations, only needs GitHub configuration
  • Complete functionality - Create, update, close, reopen, manage labels/assignees
  • Full type safety - Comprehensive TypeScript definitions
  • Consistent patterns - Follows exact same approach as mergePullRequest
  • Rich error handling - Specific error messages for different scenarios

Usage Examples

Create Issue

const issue = await vibeKit.createIssue({
  title: "Bug: Authentication fails on mobile",
  body: "Users report login issues on iOS devices", 
  labels: ["bug", "mobile", "priority-high"],
  assignees: ["developer1", "qa-tester"]
});

Update/Close Issue

await vibeKit.updateIssue(issue.number, {
  state: "closed",
  state_reason: "completed",
  labels: ["bug", "resolved"]
});

Workflow Integration

// 1. Create issue → 2. Generate code → 3. Create PR → 4. Update issue → 5. Close after merge
const issue = await vibeKit.createIssue({
  title: "Add user authentication",
  labels: ["enhancement"]
});

await vibeKit.generateCode({ prompt: "Add login form with validation" });
const pr = await vibeKit.createPullRequest();

await vibeKit.updateIssue(issue.number, {
  body: issue.body + `\n\nPR created: ${pr.html_url}`
});

Documentation

New API Reference Pages

  • /docs/api-reference/create-issue.mdx - Complete createIssue documentation
  • /docs/api-reference/update-issue.mdx - Complete updateIssue documentation

Updated Integration Guide

  • /docs/sdk/github-integration.mdx - Added comprehensive Issues section with:
    • Basic issue creation and updates
    • Label and assignee management
    • Workflow integration examples
    • Automated issue management patterns
    • Complete end-to-end workflows

Navigation Updates

  • Added new commands to /docs/docs.json navigation menu

Breaking Changes

None - this is a purely additive feature that doesn't modify existing APIs.

Testing

  • Follows existing patterns for GitHub API integration
  • Includes comprehensive error handling for all GitHub API scenarios
  • Type-safe implementation prevents runtime errors

Files Changed

  • packages/sdk/src/types.ts - Added issue-related type definitions
  • packages/sdk/src/core/vibekit.ts - Implemented createIssue and updateIssue methods
  • packages/sdk/src/index.ts - Added exports for new types
  • docs/api-reference/create-issue.mdx - New API documentation
  • docs/api-reference/update-issue.mdx - New API documentation
  • docs/sdk/github-integration.mdx - Updated integration guide
  • docs/docs.json - Added navigation entries

Use Cases Enabled

  • 🎯 Automated project management - Create issues from code generation errors
  • 🎯 Workflow automation - Update issues based on PR status changes
  • 🎯 Issue lifecycle management - Programmatic issue state transitions
  • 🎯 Bulk operations - Manage multiple issues (closing stale issues, bulk labeling)
  • 🎯 Integration workflows - Complete issue → code → PR → merge workflows

@vercel
Copy link

vercel bot commented Aug 28, 2025

@joedanz is attempting to deploy a commit to the Superagent Team on Vercel.

A member of the Team first needs to authorize it.

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