Merge branch 'main' into henrymercer/simplify-actions-only

This commit is contained in:
Henry Mercer 2024-07-02 15:52:14 +02:00
commit 2d3d0ca0c7
808 changed files with 37371 additions and 2397 deletions

View file

@ -139,6 +139,15 @@ export async function getWorkflowRelativePath(): Promise<string> {
);
const workflowUrl = runsResponse.data.workflow_url;
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.
return runsResponse.data.path as string;
}
const workflowResponse = await apiClient.request(`GET ${workflowUrl}`);
return workflowResponse.data.path as string;