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 7d78d5fc1a9 (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 <levraiphilippeblain@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Oct 11, 2020 at 21:27 UTC d0ff1a3cbc579947c5daeeb5ac433885a0bdc88e
1 file changed +1 -1
.github/workflows/main.yml
+1 -1
@@ -65,7 +65,7 @@ jobs:
65 core.setOutput('enabled', ' but skip');
66 break;
67 }
68 - if (tree_id === run.head_commit.tree_id) {
68 + if (run.head_commit && tree_id === run.head_commit.tree_id) {
69 core.warning(`Successful run for the tree ${tree_id}: ${run.html_url}`);
70 core.setOutput('enabled', ' but skip');
71 break;