Skip to content

Conversation

@Tsopic
Copy link

@Tsopic Tsopic commented Aug 7, 2025

Summary

This PR adds automatic pull request creation functionality to Claude Squad when pushing changes with the 'p' command. If the environment supports it (GitHub repository with authenticated GitHub CLI), a PR to the main branch will be created automatically after a successful push.

Changes

  • Added createPullRequestIfPossible() method to handle PR creation logic
  • Integrated PR creation into the existing PushChanges() workflow
  • Implemented smart detection to skip PR creation when:
    • Already on main/master branch
    • Not in a GitHub repository
    • GitHub CLI is not available or authenticated
    • PR already exists for the branch

Key Features

  • Automatic PR Creation: After pushing with 'p', a PR is automatically created if possible
  • Graceful Degradation: Works seamlessly in non-GitHub environments by skipping PR creation
  • Duplicate Prevention: Detects existing PRs and avoids creating duplicates
  • Clear Logging: Provides informative log messages for successful creation and skip scenarios
  • Zero Configuration: Works out-of-the-box with existing GitHub CLI authentication

Testing

  • All existing tests pass
  • Manual testing recommended following the test plan in the implementation

This enhancement streamlines the workflow for Claude Squad users by reducing the manual steps needed to create pull requests after pushing changes.

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

@github-actions
Copy link

github-actions bot commented Aug 7, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

- Added createPullRequestIfPossible() method to handle PR creation
- Integrated PR creation into PushChanges() workflow
- PR targets main branch automatically when environment supports it
- Handles edge cases: existing PRs, non-GitHub repos, main branch
- Added logs/ to .gitignore to prevent log files in commits
@Tsopic Tsopic force-pushed the tsopic/create-a-pull-request-after-push branch from 7792bee to 34bdfd4 Compare August 7, 2025 11:29
@Tsopic
Copy link
Author

Tsopic commented Aug 7, 2025

I have read the CLA Document and I hereby sign the CLA

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.

1 participant