Skip to content

Commit 989234f

Browse files
author
Mark Robinson
committed
Loosen requirement on regex to allow blob URLs
Single file URLs now work but do not contain the whole workflow in the RO bundle
1 parent ecc68d2 commit 989234f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/commonwl/viewer/services/GitHubService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class GitHubService {
5656
private final RepositoryService repoService;
5757

5858
// URL validation for directory links
59-
private final String GITHUB_DIR_REGEX = "^https:\\/\\/github\\.com\\/([A-Za-z0-9_.-]+)\\/([A-Za-z0-9_.-]+)\\/?(?:tree\\/([^/]+)\\/(.*))?$";
59+
private final String GITHUB_DIR_REGEX = "^https?:\\/\\/github\\.com\\/([A-Za-z0-9_.-]+)\\/([A-Za-z0-9_.-]+)\\/?(?:(?:tree|blob)\\/([^/]+)\\/(.*))?$";
6060
private final Pattern githubDirPattern = Pattern.compile(GITHUB_DIR_REGEX);
6161

6262
@Autowired

0 commit comments

Comments
 (0)