nx-set-shas icon indicating copy to clipboard operation
nx-set-shas copied to clipboard

Add support for git forking workflow

Open tschaffter opened this issue 1 year ago • 1 comments

We use the git forking workflow and each developer open PRs against the upstream repo from their fork.

It seems from the code of nrwl/nx-set-shas@v4 that the main branch of the fork is used to compute the Base SHA, not the main branch of upstream. The code seems to systematically use origin/${mainBranchName}. In the context of a PR opened from a fork that target the upstream repo, origin refers to the remote of the fork.

Is there a way with the current implementation to have the Base SHA calculated using the actual target remote (e.g. upstream)?

If not, one solution would be to allow the user of the action to specify the remote too, in a similar way the action actions/checkout@v4 allows us to do so.

tschaffter avatar Feb 29 '24 18:02 tschaffter

Hi there @tschaffter ! I am looking into a way to implement this feature, but I am not sure how soon this will happen! If in the meantime you want to try implementing it, let me know and I can help!

mandarini avatar Jun 11 '24 11:06 mandarini

@tschaffter have you found a solution to this yet?

jordanpowell88 avatar Feb 19 '25 15:02 jordanpowell88

@jordanpowell88 Not yet.

tschaffter avatar Feb 19 '25 17:02 tschaffter