A pull request is a bunch of commits forking for some other commit. As such, the same commits should be applicable to the forked repository (Solr or Lucene), at least initially (until the folder structure changes, for example).
Here is a sample workflow to apply an existing pull request from Lucene:
https://github.com/apache/lucene-solr/pull/2459
git clone https://github.com/apache/lucene.git cd lucene wget https://github.com/apache/lucene-solr/pull/2459.patch git apply 2459.patch git add -A . git commit -m “Applying PR # ...” git push
create a github fork of the lucene repository (mine at https://github.com/dweiss/lucene)
locate the source repository and branch of the PR. For our example: https://github.com/apache/lucene-solr/pull/2459 the source is: https://github.com/donnerpeter/lucene-solr/tree/revTrie
Now create a “cloned” PR:
git clone https://github.com/dweiss/lucene.git cd lucene
git remote add donnerpeter https://github.com/donnerpeter/lucene-solr.git git fetch donnerpeter
git checkout donnerpeter/revTrie -b revTrie
git push origin HEAD -u
https://github.com/apache/lucene/compare/main...dweiss:revTrie Look at the PR and create it if it looks good.