This commit is contained in:
Marco Gario 2024-07-01 12:14:01 +00:00
parent dbfc2b6359
commit ddd849e831
3 changed files with 5 additions and 4 deletions

2
lib/api-client.js generated
View file

@ -124,7 +124,7 @@ async function getWorkflowRelativePath() {
});
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.

File diff suppressed because one or more lines are too long

View file

@ -139,8 +139,9 @@ export async function getWorkflowRelativePath(): Promise<string> {
);
const workflowUrl = runsResponse.data.workflow_url;
const requiredWorkflowRegex = /\/repos\/[^/]+\/[^/]+\/actions\/required_workflows\/[^/]+/;
if (!workflowUrl || requiredWorkflowRegex.test(workflowUrl)) {
const requiredWorkflowRegex =
/\/repos\/[^/]+\/[^/]+\/actions\/required_workflows\/[^/]+/;
if (!workflowUrl || requiredWorkflowRegex.test(workflowUrl as string)) {
// 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.