diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-10-11 23:27:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-12 21:27:10 +0200 |
commit | d0ff1a3cbc579947c5daeeb5ac433885a0bdc88e (patch) | |
tree | 889107108bbe3710d26db27977080904e7f1349d /.github/workflows/main.yml | |
parent | ci: do not skip tagged revisions in GitHub workflows (diff) | |
download | git-d0ff1a3cbc579947c5daeeb5ac433885a0bdc88e.tar.xz git-d0ff1a3cbc579947c5daeeb5ac433885a0bdc88e.zip |
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 '')
-rw-r--r-- | .github/workflows/main.yml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a9acb6a19..d4298878f5 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; |