[llvm] [workflows] issue-write: Exit early if there are no comments (PR #87114)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 14:52:41 PDT 2024


https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/87114

This will eliminate some unnecessary REST API calls.

>From d143591d90bc5a67bcdbead2c881347739d84221 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 29 Mar 2024 14:50:45 -0700
Subject: [PATCH] [workflows] issue-write: Exit early if there are no comments

This will eliminate some unnecessary REST API calls.
---
 .github/workflows/issue-write.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/issue-write.yml b/.github/workflows/issue-write.yml
index 02a5f7c213e898..f5b84fec17a792 100644
--- a/.github/workflows/issue-write.yml
+++ b/.github/workflows/issue-write.yml
@@ -31,7 +31,7 @@ jobs:
           script: |
             var fs = require('fs');
             const comments = JSON.parse(fs.readFileSync('./comments'));
-            if (!comments) {
+            if (!comments || comments.length == 0) {
               return;
             }
 



More information about the llvm-commits mailing list