Skip to content

Commit

Permalink
+1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Dec 15, 2024
1 parent 9495d3b commit 97a9407
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/upstream force tracking.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Upstream force tracking
name: Upstream PR force-push tracking

on:
push:
branches-ignore:
- 'subm-pretest/**'
schedule:
- cron: '30 * * * *'
workflow_dispatch:
Expand Down Expand Up @@ -168,12 +171,12 @@ jobs:
# Write-Host "No upstream changes for PR $pr_num"
continue
}
Write-Host "Upstream changes for PR $pr_num: $upstream_fwd_c new commits"
Write-Host "Upstream changes for PR ${pr_num}: $upstream_fwd_c new commits"
$ft_fwd_c = git rev-list --count "$b_r_upstream..HEAD"
if (-not $?) { throw "git rev-list failed" }
if ($ft_fwd_c -eq 0) {
Write-Host "Force-tracking branch for PR $pr_num is in-line with upstream, fast-forwarding"
Write-Host "Force-tracking branch is inline under upstream, fast-forwarding"
git reset --hard $b_r_upstream
if (-not $?) { throw "git reset failed" }
git push
Expand Down

0 comments on commit 97a9407

Please sign in to comment.