File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 44# recording whether the build passes or fails for each.
55
66commits=$@
7- test " $commits " || commits=$( git rev-list HEAD ^master | sed ' 1!G;h;$!d' )
7+
8+ remote=$( git rev-parse --symbolic-full-name HEAD@{u})
9+ remote=${remote%/* }
10+ remote=${remote# refs/ remotes/ }
11+ headBranch=$( git remote show " $remote " | grep HEAD | sed ' s/ *HEAD branch: //' )
12+
13+ test " $commits " || commits=$( git rev-list HEAD " ^$headBranch " | sed ' 1!G;h;$!d' )
814# NB: The sed line above reverses the order of the commits.
915# See: http://stackoverflow.com/a/744093
1016
Original file line number Diff line number Diff line change 203203 # Add/update the GitHub Action setup script.
204204 cat > " $tmpFile " << EOL
205205#!/bin/sh
206- curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master /ci-setup-github-actions.sh
206+ curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main /ci-setup-github-actions.sh
207207sh ci-setup-github-actions.sh
208208EOL
209209 chmod +x " $tmpFile "
212212 # Add/update the GitHub Action build script.
213213 cat > " $tmpFile " << EOL
214214#!/bin/sh
215- curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master /ci-build.sh
215+ curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main /ci-build.sh
216216sh ci-build.sh
217217EOL
218218 chmod +x " $tmpFile "
Original file line number Diff line number Diff line change 2424
2525for ref in $( git for-each-ref refs/remotes/$remote --format=' %(refname)' )
2626do
27-
27+ headBranch= $( git remote show " $remote " | grep HEAD | sed ' s/ *HEAD branch: // ' )
2828 refname=${ref# refs/ remotes/ $remote / }
29- case " $refname " in contrib|master) continue ;; esac
30- unmerged_count=$( git cherry master $ref | grep ' ^+' | wc -l)
31- info=$( git log -n 1 --format=' %an - %ar' $ref )
32- echo $refname - $info - $unmerged_count unmerged
33- done
29+ test " $refname " = " $headBranch " -o " $refname " = HEAD && continue
30+ unmerged_count=$( git cherry " $headBranch " " $ref " | grep ' ^+' | wc -l)
31+ author=$( git log -n 1 --format=' %an' " $ref " )
32+ timestamp=$( git log -n 1 --format=' %ar' " $ref " )
33+ echo " $refname ~$author ~$timestamp ~$unmerged_count unmerged"
34+ done | column -t -s ' ~'
You can’t perform that action at this time.
0 commit comments