How to set default fork for pull requests?

后端 未结 3 2109
花落未央
花落未央 2020-12-15 04:46

I have a set of documentation for my company\'s API, based on the excellent Slate framework from TripIt. Per instructions, I forked their repo and proceeded to customize it.

3条回答
  •  我在风中等你
    2020-12-15 05:18

    It is unfortunate that GitHub does not provide a way to configure the default PR target repo.

    If you can delete (or get the owner to delete) the original repo A from which B was forked, then that will do the trick.

    If it is not possible/agreeable to delete A, but the owner of A is willing to do the following, then the fork link gets broken, on GitHub Enterprise at least:

    • mark repo A as Private
    • mark repo A as Public again

    After doing this, repo B (which was originally forked from A) will default to opening PRs against itself, rather than A.

    Note: if A itself was forked from something further back in the history, then unfortunately it seems that B starts defaulting to opening PRs against that repo once A has gone. The only solution would be to apply the above to all repos upstream in the fork tree :(

提交回复
热议问题