Skip to content

Commit

Permalink
fix(create): Use main as default Github branch
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Nov 9, 2020
1 parent 37960c8 commit 1a951e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/create/__tests__/create-command.test.js
Expand Up @@ -277,7 +277,7 @@ describe("CreateCommand", () => {

expect(await manifestCreated(cwd)).toHaveProperty(
"homepage",
"https://github.com/test/test/tree/master/packages/foo-pkg#readme"
"https://github.com/test/test/tree/main/packages/foo-pkg#readme"
);
});

Expand Down
2 changes: 1 addition & 1 deletion commands/create/index.js
Expand Up @@ -320,7 +320,7 @@ class CreateCommand extends Command {
const relativeTarget = path.relative(this.project.rootPath, this.targetDir);

if (hurl.hostname.match("github")) {
hurl.pathname = path.posix.join(hurl.pathname, "tree/master", relativeTarget);
hurl.pathname = path.posix.join(hurl.pathname, "tree/main", relativeTarget);
// TODO: get actual upstream HEAD branch name
// current remote: git rev-parse --abbrev-ref --symbolic-full-name @{u}
// upstream HEAD: git symbolic-ref --short refs/remotes/origin/HEAD
Expand Down

0 comments on commit 1a951e9

Please sign in to comment.