sindresorhus/refined-github

Highlight a PR's base branch if it's not the default #3461

fregante posted onGitHub

Initially attempted in https://github.com/sindresorhus/refined-github/pull/455

<img width="790" alt="base branch highlight" src="https://cloud.githubusercontent.com/assets/1402241/26586700/9743deae-4582-11e7-9fcc-1609ad3d6f22.png">

I think this could be an easy addition to https://github.com/sindresorhus/refined-github/pull/3408 since it has the logic already and only needs

 if base === default branch
   hide base
+ else
+   highlight base

cc @kidonng


since it has the logic already

I think I need to elaborate it here a little (yeah this should have been a comment in the code 🤷‍♀️):

https://github.com/sindresorhus/refined-github/blob/79a8166955f56ca9185ec9f8db2d56da0d2b304f/source/features/clean-conversation-headers.tsx#L30

The link is /foo/bar when the PR's base is default branch, and /foo/bar/tree/baz when it is not. But we can't just check for tree because it can appear in repo names, etc. So we check counts of /

posted by kidonng over 4 years ago

Yeah it was clear to me, good logic (even if unexplained)

posted by fregante over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests