Goal: A jenkins pipeline that forks a repo, makes a change, pushes the change and generates a PR from master.
My issue is that since this may run in parallel, I need each fork to have a unique name. The gh
command-line tool seems to indicate this is possible with the --remote-name
flag, but it's not doing what I'd expect and I don't know if there is another way
My command
gh repo fork https://host/team/aws.git --remote=true --clone
properly creates a user/aws
repo, however
gh repo fork https://host/team/aws.git --remote-name=ME-test --clone
returns user/aws already exists
Is there another way to achieve a renamed fork?
git fetch $upstream_url remote_branch:local_branch
would update your local (fork's) branch with commits from upstream. TBH I'm not aware of the fact that GitHub allows giving forks a different name, they are always called$user/$reponame
with$reponame
being the upstream name (I could be mistaken though) – Nikola$user/$reponame
with$reponame
being the upstream name": it is actually possible since Apr. 2022. – Zayas