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
Technical Considerations
- Use EGit's
BranchOperationUI for branch checkout
- Fetch branch using JGit
FetchCommand if 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
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
Acceptance Criteria
Technical Considerations
BranchOperationUIfor branch checkoutFetchCommandif not present