File tree 3 files changed +16
-9
lines changed
3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 4
4
# recording whether the build passes or fails for each.
5
5
6
6
commits=$@
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' )
8
14
# NB: The sed line above reverses the order of the commits.
9
15
# See: http://stackoverflow.com/a/744093
10
16
Original file line number Diff line number Diff line change 203
203
# Add/update the GitHub Action setup script.
204
204
cat > " $tmpFile " << EOL
205
205
#!/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
207
207
sh ci-setup-github-actions.sh
208
208
EOL
209
209
chmod +x " $tmpFile "
212
212
# Add/update the GitHub Action build script.
213
213
cat > " $tmpFile " << EOL
214
214
#!/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
216
216
sh ci-build.sh
217
217
EOL
218
218
chmod +x " $tmpFile "
Original file line number Diff line number Diff line change 24
24
25
25
for ref in $( git for-each-ref refs/remotes/$remote --format=' %(refname)' )
26
26
do
27
-
27
+ headBranch= $( git remote show " $remote " | grep HEAD | sed ' s/ *HEAD branch: // ' )
28
28
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