Skip to content

Commit

Permalink
+73 - cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Aug 18, 2024
1 parent deb1682 commit ec79bf2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/upstream pretest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
$exec_list += @{
'org_repo' = "$subm_owner/$subm_name";
'fork_repo' = "SunSerega/$subm_name";
'subm_url' = $subm_url;
'pr_num' = $pr_num;
}
}
Expand Down Expand Up @@ -154,17 +153,19 @@ jobs:
- name: pretest
run: |
$org_repo = '${{ matrix.exec-data.org_repo }}'
$fork_repo = '${{ matrix.exec-data.fork_repo }}'
$subm_url = "${{ matrix.exec-data.subm_url }}"
$pr_num = "${{ matrix.exec-data.pr_num }}"
Write-Host "Testing PR $pr_num from: $subm_url"
Push-Location './core'
Push-Location './fork'
git fetch
#
Pop-Location
Push-Location './fork'
Push-Location './core'
git fetch
#
Pop-Location
remove-old-pretest:
Expand Down Expand Up @@ -213,8 +214,9 @@ jobs:
New-Item -ItemType Directory -Path $main_repo_dir | Out-Null
Push-Location $main_repo_dir
$main_repo_url = '${{ github.server_url }}/${{ github.repository }}'
Write-Host "Cloning main repo: $main_repo_url"
git clone --filter=tree:0 --no-progress --no-checkout $main_repo_url .
$main_repo_branch = '${{ github.head_ref || github.ref_name }}'
Write-Host "Cloning main repo [$main_repo_url]: branch [$main_repo_branch]"
git clone -b $main_repo_branch --filter=tree:0 --no-progress --no-checkout $main_repo_url .
# git branch -r
$core_removed_pr_nums = @()
Expand All @@ -232,7 +234,7 @@ jobs:
}
if ($is_trivial) {
Write-Host "Is trivial, removing..."
git push origin --delete $branch_name # BRANCH DELETE
git push origin --delete $branch_name # BRANCH DELETE
$core_removed_pr_nums += $pr_num
}
Write-Host '~~~~~'
Expand All @@ -251,7 +253,7 @@ jobs:
Write-Host "But main repo is still referencing it"
} else {
Write-Host "Removing..."
git push origin --delete "pretest/$pr_num" # BRANCH DELETE
git push origin --delete "pretest/$pr_num" # BRANCH DELETE
}
Write-Host '~~~~~'
}
Expand Down

0 comments on commit ec79bf2

Please sign in to comment.