Skip to content

Commit d0ff1a3

Browse files
dschogitster
authored andcommitted
ci: work around old records of GitHub runs
Apparently older GitHub runs at least _sometimes_ lack information about the `head_commit` (and therefore the `ci-config` check will fail with "TypeError: Cannot read property 'tree_id' of null") in the check added in 7d78d5f (ci: skip GitHub workflow runs for already-tested commits/trees, 2020-10-08). Let's work around this by adding a defensive condition. Reported-by: Philippe Blain <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4463ce7 commit d0ff1a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
core.setOutput('enabled', ' but skip');
6666
break;
6767
}
68-
if (tree_id === run.head_commit.tree_id) {
68+
if (run.head_commit && tree_id === run.head_commit.tree_id) {
6969
core.warning(`Successful run for the tree ${tree_id}: ${run.html_url}`);
7070
core.setOutput('enabled', ' but skip');
7171
break;

0 commit comments

Comments
 (0)