summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-10-11 21:27:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-12 19:27:10 (GMT)
commitd0ff1a3cbc579947c5daeeb5ac433885a0bdc88e (patch)
tree889107108bbe3710d26db27977080904e7f1349d /.github
parent4463ce75b7eea47f9b484b05957def655d3f46d5 (diff)
downloadgit-d0ff1a3cbc579947c5daeeb5ac433885a0bdc88e.zip
git-d0ff1a3cbc579947c5daeeb5ac433885a0bdc88e.tar.gz
git-d0ff1a3cbc579947c5daeeb5ac433885a0bdc88e.tar.bz2
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>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/main.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0a9acb6..d429887 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -65,7 +65,7 @@ jobs:
core.setOutput('enabled', ' but skip');
break;
}
- if (tree_id === run.head_commit.tree_id) {
+ if (run.head_commit && tree_id === run.head_commit.tree_id) {
core.warning(`Successful run for the tree ${tree_id}: ${run.html_url}`);
core.setOutput('enabled', ' but skip');
break;