Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve branch name assignment - #21

Closed
paulmolluzzo wants to merge 5 commits into
masterfrom
improve/weird/branchnames
Closed

paulmolluzzo wants to merge 5 commits into
masterfrom
improve/weird/branchnames

Conversation

@paulmolluzzo

Copy link
Copy Markdown
Contributor

This was a red herring that I tried to murder with regex. Sorry for the mess.

Fixes #18.

Basically, in your own repo the branch var assignment was incorrect, leading to bad URLs in the linkified repos at the top of a PR. This PR should be evidence of the fix.

…t branch name of forked repo"

Repo names can't have a slash in them as GH will replace the slash with
a hyphen

This reverts commit 6528ce2.
Comment thread extension/content.js
// if there are two parts the first part is the username
if (parts.length > 1) {
let username = parts.eq(0).text();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, isn't that the same as on line 26-29?

See: d17a137

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's not the same exactly. My change will use the owner's name in the URL. The master branch (without this update) will use the current user's username.

Master:
master

This branch:
this branch

@paulmolluzzo

Copy link
Copy Markdown
Contributor Author

Sorry for the sloppiness here. 😞

@sindresorhus

Copy link
Copy Markdown
Member

LGTM. @hkdobrev ?

(i will squash the commits when merging)

@hkdobrev

Copy link
Copy Markdown
Contributor

I haven't noticed this before, but indeed I've just reproduced the problem and could verify this fixes it. I'd say the code changes are an improvement as well. ownername is definitely better than username and vendorName.

LGTM 💫

@sindresorhus
sindresorhus deleted the improve/weird/branchnames branch February 18, 2016 20:27
@sindresorhus

Copy link
Copy Markdown
Member

Good stuff @paulmolluzzo :)

@paulmolluzzo

Copy link
Copy Markdown
Contributor Author

🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Linkifies branch references in pull requests doesn't work properly.

3 participants