Open
Description
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"