GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(gitcafe): SCP remotes with a leading slash find their repository … · pingdotgg/t3code@7ea8041

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/source-control-gitcafe/src/server
    • gitCafeHosts.test.ts
    • gitCafeHosts.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/source-control-gitcafe/src/server/gitCafeHosts.test.ts‎

Copy file name to clipboardExpand all lines: packages/source-control-gitcafe/src/server/gitCafeHosts.test.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ describe("gitCafeHosts", () => {
1515
it.each([
1616
["https://staging.git.cafe/team/project.git/", "staging.git.cafe"],
1717
["[email protected]:team/project.git", "git.cafe"],
18+
["[email protected]:/team/project.git", "git.cafe"],
1819
["ssh://[email protected]/team/project.git", "git.cafe"],
1920
["ssh://git.cafe/team/project.git", "git.cafe"],
2021
["ssh://git.cafe:2222/team/project.git", "git.cafe"],
@@ -29,6 +30,7 @@ describe("gitCafeHosts", () => {
2930
it.each([
3031
"https://evil.git.cafe/team/project.git",
3132
"https://git.cafe/team/nested/project.git",
33+
"git.cafe://team/project.git",
3234
"team/project",
3335
])("is not a GitCafe repository: %s", (url) => {
3436
assert.isNull(GitCafeHosts.parseGitCafeRemote(url));
Collapse file

‎packages/source-control-gitcafe/src/server/gitCafeHosts.ts‎

Copy file name to clipboardExpand all lines: packages/source-control-gitcafe/src/server/gitCafeHosts.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const REPOSITORY = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u;
1414
const REMOTE_PATTERNS = [
1515
/^https?:\/\/(?:[^@/]+@)?([^/:]+)(?::\d+)?\/(.+)$/iu,
1616
/^ssh:\/\/(?:[^@/]+@)?([^/:]+)(?::\d+)?\/(.+)$/iu,
17-
/^(?:[^@/:]+@)?([^/:]+):(.+)$/u,
17+
/^(?:[^@/:]+@)?([^/:]+):\/?(.+)$/u,
1818
];
1919

2020
export function gitCafeRepositoryPath(path: string): string | null {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.