Update src/api-client.ts

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
This commit is contained in:
Marco Gario 2024-07-01 11:01:12 +02:00 committed by GitHub
parent 37b6ead477
commit 0ff1bdba7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -140,7 +140,7 @@ export async function getWorkflowRelativePath(): Promise<string> {
const workflowUrl = runsResponse.data.workflow_url;
const requiredWorkflowRegex = /\/repos\/[^/]+\/[^/]+\/actions\/required_workflows\/[^/]+/;
if (!workflowUrl || workflowUrl === "" || requiredWorkflowRegex.test(workflowUrl)) {
if (!workflowUrl || requiredWorkflowRegex.test(workflowUrl)) {
// For required workflows, the workflowUrl is invalid so we cannot fetch more informations
// about the workflow.
// However, the path is available in the original response.