-
Notifications
You must be signed in to change notification settings - Fork 0
Add feature to automatically checkout pull request source branch #11
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Provide a one-click action to automatically checkout the branch associated with a pull request, allowing users to test code locally and use full IDE features.
User Story
As a developer reviewing a pull request, I want to quickly checkout the PR's source branch, so that I can run tests, debug code, and use IDE features like code navigation and refactoring.
Proposed Solution
- Add "Checkout Branch" action in pull request view
- Fetch remote branch if not present locally
- Switch to the branch using JGit/EGit APIs
- Handle uncommitted changes (stash, prompt, or warn)
- Show confirmation with branch name
- Update Eclipse workspace to reflect checked-out code
Acceptance Criteria
- "Checkout Branch" button/action available in PR detail view
- Action fetches remote branch if not available locally
- Switches active branch to PR source branch
- Handles uncommitted local changes gracefully
- Shows confirmation dialog with branch information
- Works for both GitHub and Bitbucket repositories
- Integrates with EGit branch switching UI patterns
- Updates Eclipse workspace and package explorer
Technical Considerations
- Use EGit's
BranchOperationUIfor branch checkout - Fetch branch using JGit
FetchCommandif not present - Parse PR metadata to determine source branch name and remote
- Handle detached HEAD state for forked repository PRs
- Respect EGit preferences for stashing uncommitted changes
- Consider integration with EGit's "Switch To" branch dialog
- Handle authentication for private repositories
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Projects
Status
In progress