Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to take ownership of a Pull Request?

Background

A few months ago I started using graylog2 and championing its use within my company. Things have been going great and I read all the documentation I could find, with the (very little) time I am given.

Still, I managed to contribute to the project itself! I found several wrongfully documented features and issues and I already made PR's ( that were accepted by the organization ) to fix them in several of their projects!

Given my will to contribute, they have given me a chance to go from zero to hero - finish a Pull Request that was abandoned: https://github.com/Wizcorp/node-graylog2

Problem

The problem here is that I don't know how to take ownership of an abandoned PR in github. According to what I read, there is no "pass ownership of this PR to someone else" feature.

I have asked for help but no one answered. I really want to take this chance and contribute to the community ( there are so many ways to help! ) but I have no idea on how to move forward.

Question

Can someone help me and tell me how I can take ownsership of an abandoned Pull Request ?

like image 250
Flame_Phoenix Avatar asked Jun 10 '18 07:06

Flame_Phoenix


1 Answers

You can:

  • clone your fork
  • add Wizcorp as a remote to https://github.com/Wizcorp/node-graylog2
  • fetch Wizcorp: that will include the PR branch. See also "Checking out pull requests locally"
  • checkout your own PR branch to its HEAD
  • rebase it on top of current master (in order to validate the current PR work when used with the most recent code)
  • add your own commits to your PR branch (which includes the commits from the original PR)
  • push and make a new PR from your pushed branch.

That is:

git clone https://github.com/<you>/node-graylog2 # your fork of node-graylog2
cd node-graylog2
git remote add Wizcorp https://github.com/Wizcorp/node-graylog2

# replace ID with the old PR ID
# for instance: 22 for https://github.com/Wizcorp/node-graylog2/pull/22

# replace BRANCHNAME by a name representing the theme of your PR
git fetch Wizcorp pull/ID/head:BRANCHNAME 

git rebase master BRANCHNAME
# commit
git push -u origin BRANCHNAME

On GitHub, make a new PR from the branch you just pushed.
In other words, you don't take ownership of an old PR, you just make a new branch which will include the old PR commits plus your new ones.
You can write in the PR message that your work is based on the old PR.

like image 142
VonC Avatar answered Sep 20 '22 02:09

VonC