easybuild-framework
easybuild-framework copied to clipboard
Wrong logic in `--sync-pr-with-develop` for fork repository name
trafficstars
Currently --sync-pr-with-develop relies on the pr_target_repo option to decide the repository name.
The same name is used bot for the the target repo and the source one.
This does not take into account that the repo opening the PR can have a different name from the original one. See for example
https://github.com/easybuilders/easybuild-easyconfigs/pull/22275
Where we have:
- easybuilders/easybuild-easyconfigs:develop
- julianmorillo/easybuild-easyconfigs-jmorillo:PR_BRANCH_NAME
Attempting to run the command without specifying --pr-target-repo will result in the wrong repo being accessed for downloading the PR branch
(easybuild-dev) crivella@crivella-desktop:~$ eb --sync-pr-with-develop 22275
== Temporary log file in case of crash /home/crivella/.local/easybuild/logs/easybuild-j262wq7z.log
== Determined branch name corresponding to easybuilders/easybuild-easyconfigs PR #22275: HepMC3
== fetching branch 'HepMC3' from https://github.com/julianmorillo/easybuild-easyconfigs.git...
Username for 'https://github.com':
While attempting to specify it will look for the PR on the specified repo which will not exist on the easybuilders side
(easybuild-dev) crivella@crivella-desktop:~$ eb --sync-pr-with-develop 22275 --pr-target-repo=easybuild-easyconfigs-jmorillo
== Temporary log file in case of crash /home/crivella/.local/easybuild/logs/easybuild-a3ba7_7u.log
ERROR: Failed to get data for PR #22275 from easybuilders/easybuild-easyconfigs-jmorillo