Skip to content

Batch mode doesn't auto-close GitHub issues after successful implementation #322

@akaszubski

Description

@akaszubski

Summary

When batch processing completes successfully via /implement --issues, the GitHub issues are not automatically closed. The user has to manually close them after the batch completes.

What Does NOT Work

Pattern that FAILS: Batch completion without issue closure

  • Batch implements all features successfully
  • Commits are created with issue references
  • Merge to main completes
  • Push to origin completes
  • Issues remain OPEN - user must manually run gh issue close

Expected Behavior

After a successful batch implementation:

  1. Each issue should be closed when its implementation commit is created
  2. OR all issues should be closed after successful merge to main
  3. Close comment should reference the commit hash

Implementation Approach

Add to auto_git_workflow.py or create new batch_issue_closer.py:

def close_batch_issues(batch_state: dict, merge_commit: str):
    """Close all issues in batch after successful merge."""
    for feature in batch_state['completed_features']:
        if 'issue' in feature:
            subprocess.run([
                'gh', 'issue', 'close', str(feature['issue']),
                '--comment', f'Implemented in {merge_commit}'
            ])

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions