question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`default-branch-button` on forks: add secondary button to see folder on source repo

See original GitHub issue
  1. Visit https://github.com/fregante/refined-github/blob/incremental-tag-changelog-link/source/background.ts
  2. There should be a << link to https://github.com/sindresorhus/refined-github/blob/master/source/background.ts

Example: (ignore the arrow)

How:

  1. Edit the get-default-branch function to accept a user/repo string (and it should only use parseBranchFromDom if the string matches the current page)
  2. Add the button on forks using the CSS code here: https://github.com/sindresorhus/refined-github/pull/1132

More issues semi-related to this one: https://github.com/sindresorhus/refined-github/pull/1115 https://github.com/sindresorhus/refined-github/pull/1168 https://github.com/sindresorhus/refined-github/pull/1557

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
yakov116commented, Jun 12, 2020

I just realized that Unrelated Feature 😄 it exactly this!

Can I have a go for it?

Played around:

Version 1 image

Version 2 image

Version 3 image

1reaction
fregantecommented, Jun 12, 2020

If we change the pathname we mess up this line

export function getForkedRepo(): string | undefined {
- 	return select<HTMLAnchorElement>('.fork-flag a')?.pathname.slice(1);
+ 	return select<HTMLAnchorElement>('.fork-flag a')?.pathname.slice(1).split('/', 2).join('/');
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Fork a repo - GitHub Docs
In the top-right corner of the page, click Fork. Fork button; Select an owner for the forked repository. Create a new fork page...
Read more >
Project forking workflow - GitLab Docs
A fork is a personal copy of the repository and all its branches, which you create ... You can also use git remote...
Read more >
Manage branches in your Git repo - Azure - Microsoft Learn
In this article. Organize your branches; Review updates to your branches; View branch history; Change your default branch.
Read more >
How do I update or sync a forked repository on GitHub?
It will sync the default branch of your fork with the upstream repository. Visit the URL, click the green "Install" button and select...
Read more >
Chapter 31 Fork and clone | Happy Git and GitHub for the useR
Use the big green “Code” button to get the URL for OWNER/REPO on your clipboard. Be intentional about whether you copy the HTTPS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found