Skip to content

package scripts should use upstream, not origin, to set repository.url from git #363

Closed
@rotu

Description

The repository URLs are based on assuming that origin is the authoritative url and updates package.json based on this. In the case of this repo, it causes tests to fail locally.

This should be expecting origin to be the default branch to push/pull and upstream to be the authoritative repo because:

Per @lukekarrys in #338 (comment)

@rotu that is due to the autodetection of the origin by git. If you've forked the repo make sure that npm/template-oss is the origin and the remote url for your fork is named something different (eg fork):

❯ git remotes
fork	git@github.com:lukekarrys/template-oss.git (fetch)
fork	git@github.com:lukekarrys/template-oss.git (push)
origin	git@github.com:npm/template-oss.git (fetch)
origin	git@github.com:npm/template-oss.git (push)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions