You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ti...@apache.org on 2024/09/24 16:30:49 UTC

(incubator-kie-tools) branch main updated: NO-ISSUE: Importing github raw URL is broken due to GitHub URL change (#2614)

This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 6fc4727e582 NO-ISSUE: Importing github raw URL is broken due to GitHub URL change (#2614)
6fc4727e582 is described below

commit 6fc4727e582615458450234ce5fe8677f8592084
Author: Luiz João Motta <lu...@gmail.com>
AuthorDate: Tue Sep 24 13:30:44 2024 -0300

    NO-ISSUE: Importing github raw URL is broken due to GitHub URL change (#2614)
---
 packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx         | 2 +-
 .../src/workspace/hooks/ImportableUrlHooks.tsx                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx b/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx
index 664da3e60d2..a7cb1a9858b 100644
--- a/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx
+++ b/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx
@@ -334,7 +334,7 @@ export function useImportableUrl(urlString?: string, allowedUrlTypes?: UrlType[]
 
     if (url.host === "raw.githubusercontent.com") {
       const gitHubRawFileMatch = matchPath<{ org: string; repo: string; tree: string; path: string }>(url.pathname, {
-        path: "/:org/:repo/:tree/:path*",
+        path: "/:org/:repo/refs/heads/:tree/:path*",
         exact: true,
         strict: true,
         sensitive: false,
diff --git a/packages/serverless-logic-web-tools/src/workspace/hooks/ImportableUrlHooks.tsx b/packages/serverless-logic-web-tools/src/workspace/hooks/ImportableUrlHooks.tsx
index aa70b60c32f..62e2e60d52e 100644
--- a/packages/serverless-logic-web-tools/src/workspace/hooks/ImportableUrlHooks.tsx
+++ b/packages/serverless-logic-web-tools/src/workspace/hooks/ImportableUrlHooks.tsx
@@ -152,7 +152,7 @@ export function useImportableUrl(args: {
       }
 
       const gitHubRawFileMatch = matchPath<{ org: string; repo: string; tree: string; path: string }>(url.pathname, {
-        path: "/:org/:repo/:tree/:path*",
+        path: "/:org/:repo/refs/heads/:tree/:path*",
         exact: true,
         strict: true,
         sensitive: false,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org