github-url-detection icon indicating copy to clipboard operation
github-url-detection copied to clipboard

`isRepoRoot()` return false if the repository doesn’t have a description

Open hawkup opened this issue 1 year ago • 0 comments

If you open the repository URL on the default branch tree (tree/main) and run isRepoRoot() without providing a URL, the isRepoRoot() function always returns false.

case 1: isRepoRoot() return false

URL: https://github.com/Shopify/function-examples/tree/main

Log context:

"getRepo()": {
	name: "function-examples",
	nameWithOwner: "Shopify/function-examples",
	owner: "Shopify",
	path: "tree/main"
},
"document.title": "Shopify/function-examples",

case 2: This works fine. isRepoRoot() return true

URL: https://github.com/Shopify/function-examples

Log context:

"getRepo()": {
	name: "function-examples",
	nameWithOwner: "Shopify/function-examples",
	owner: "Shopify",
	path: ""
},
"document.title": "Shopify/function-examples"

case 3: This works fine. isRepoRoot() return true

URL: https://github.com/Shopify/function-examples/tree/order-routing-js-template

Log context:

"getRepo()": {
	name: "function-examples",
	nameWithOwner: "Shopify/function-examples",
	owner: "Shopify",
	path: "tree/order-routing-js-template"
},
"document.title": "Shopify/function-examples at order-routing-js-template"

hawkup avatar Feb 15 '24 10:02 hawkup