Skip to content

Commit 8182a62

Browse files
authored
Merge pull request #4879 from boegel/fix_github_tests
use `develop` branch for PRs that target removed `5.0.x` branch in `fetch_files_from_pr`
2 parents dbaf194 + 9923050 commit 8182a62

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

easybuild/tools/github.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,12 @@ def fetch_files_from_pr(pr, path=None, github_user=None, github_account=None, gi
538538
pr_closed = pr_data['state'] == GITHUB_STATE_CLOSED and not pr_merged
539539

540540
pr_target_branch = pr_data['base']['ref']
541-
_log.info("Target branch for PR #%s: %s", pr, pr_target_branch)
541+
_log.info(f"Target branch for PR #{pr}: {pr_target_branch}")
542+
# 5.0.x branch was collapsed into develop branch and then removed shortly after release of EasyBuild v5.0.0,
543+
# so for PRs targeting the 5.0.x branch use develop branch instead
544+
if pr_target_branch == '5.0.x':
545+
pr_target_branch = GITHUB_DEVELOP_BRANCH
546+
_log.info(f"Using {pr_target_branch} instead of 5.0.x branch (since that branch was removed)")
542547

543548
# download target branch of PR so we can try and apply the PR patch on top of it
544549
repo_target_branch = download_repo(repo=github_repo, account=github_account, branch=pr_target_branch,

0 commit comments

Comments
 (0)