Skip to content

Commit b7f1171

Browse files
committed
cascading-runs: make looking for the /git-artifacts comment more robust
In my tests, it seems that the trailing newline may be shown when searching without any token, and trimmed when searching with token. That makes no sense, but let's guard against this condition anyway. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent c456fac commit b7f1171

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

GitForWindowsHelper/issues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const getGitArtifactsCommentID = async (context, token, owner, repo, headSHA) =>
2929
})
3030
const items = answer.items.filter(item =>
3131
item.text_matches.length === 1
32-
&& item.text_matches[0].fragment === '/git-artifacts\n\nThe tag-git workflow run was started\n'
32+
&& item.text_matches[0].fragment.trim() === '/git-artifacts\n\nThe tag-git workflow run was started'
3333
)
3434
return items.length === 1 && items[0].text_matches[0].object_url.replace(/^.*\/(\d+)$/, '$1')
3535
}

0 commit comments

Comments
 (0)