Skip to content

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

Open
@hawkup

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"

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions