Bug 559856 - allow to merge across github projects
Summary: allow to merge across github projects
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: GitHub (show other bugs)
Version: 5.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-05 03:04 EST by Ralf Hauser CLA
Modified: 2020-02-11 16:26 EST (History)
2 users (show)

See Also:


Attachments
2020-02-11 10_49_20-workspace-EclipseIDE559856.png (18.05 KB, image/png)
2020-02-11 04:54 EST, Ralf Hauser CLA
no flags Details
2020-02-11 10_51_13-Fetch from_ origin559856.png (25.79 KB, image/png)
2020-02-11 04:55 EST, Ralf Hauser CLA
no flags Details
2020-02-11 10_51_24-workspace - Eclipse IDE559856.png (22.74 KB, image/png)
2020-02-11 04:55 EST, Ralf Hauser CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser CLA 2020-02-05 03:04:06 EST
when working with github, pull requests are often across projects - e.g.
https://github.com/water-fountains/proximap/pull/326

please provide a way to merge across the projects and see the changes before the receiving project (in the example at hand https://github.com/water-fountains/proximap "develop" branch) accepts them.
The current Team->"Merge..." appears to only allow to do this with the own project ("Local" or "Remote Tracking").
Comment 1 Thomas Wolf CLA 2020-02-05 15:04:57 EST
I don't understand. From which perspective is this?

1. Owner of the original (water-fountains/proximap): can just fetch refs/pull/326/head into a local branch. See [1].
2. Owner of the fork who created the PR: could fetch the develop branch from the original and rebase onto that before creating the PR. (It's a good idea anyway to sync the fork with the original before creating a PR. Nobody likes PRs based on old versions.)

If this about making (1) easier, see bug 544815.

[1] https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally
Comment 2 Ralf Hauser CLA 2020-02-06 16:59:25 EST
Thomas, thx for the analysis.
My role is 1)

> can just fetch refs/pull/326/head into a local branch. See [1].
Is this only possible 
a) by command-line mix with eGit
b) by doing MyLin overhead of bug 544815 comment 4 I am not particularly keen on doing ?

If there is a c) to do it just in the eGit GUI, I would be interested in 2-3 annotated screenshots
Comment 3 Thomas Wolf CLA 2020-02-07 01:54:36 EST
No time to create screenshots now.

Command line would be

  git fetch origin refs/pull/326/head:refs/heads/pr326

giving a local branch "pr326". In EGit you can do the same via "Team->Remote->Fetch From..." (package explorer) or "Remote->Fetch..." (repositories view).
Comment 4 Ralf Hauser CLA 2020-02-11 04:54:37 EST
Created attachment 281769 [details]
2020-02-11 10_49_20-workspace-EclipseIDE559856.png

Screenshot step 1
Comment 5 Ralf Hauser CLA 2020-02-11 04:55:07 EST
Created attachment 281770 [details]
2020-02-11 10_51_13-Fetch from_ origin559856.png

Screenshot step 2
Comment 6 Ralf Hauser CLA 2020-02-11 04:55:44 EST
Created attachment 281771 [details]
2020-02-11 10_51_24-workspace - Eclipse IDE559856.png

Screenshot step 3

==> unfortunatly goes nowhere   :(
Comment 7 Thomas Wolf CLA 2020-02-11 16:26:56 EST
(In reply to Ralf Hauser from comment #6)
> Created attachment 281771 [details]
> 2020-02-11 10_51_24-workspace - Eclipse IDE559856.png
> 
> Screenshot step 3
> 
> ==> unfortunatly goes nowhere   :(

Of course. You fetched ref/heads/* into refs/remotes/origin/*.

The Github pull-request refs are not in the refs/heads/* namespace. Try adding a refspec for refs/pull/326/head into refs/remotes/origin/pr326.