document.github_url has `master` branch in URL
See original GitHub issueLink in contributors.txt
points to mdn/content
branch master
, which does not exist. It should be main
branch.
Interestingly enough, when I run npm run build
on local checkout, the produced files have correct URLs.
Example
Documentation pages have associated /contributors.txt
files which list contributors to the individual pages. For example, for Web/API/Window
it is at Web/API/Window/contributors.txt
Unfortunately, the link is incorrect, it has master
in it:
# Contributors by commit history
https://github.com/mdn/content/commits/master/files/en-us/web/api/window/index.html
It should have main
instead:
# Contributors by commit history
https://github.com/mdn/content/commits/main/files/en-us/web/api/window/index.html
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Getting permanent links to files - GitHub Docs
For a permanent link to the specific version of a file that you see, instead of using a branch name in the URL...
Read more >Is there a stable url to always get the default branch in github?
The solution is to use HEAD. That symbolic name will give you tip of the default branch no matter what its name is....
Read more >Git plugin - Jenkins
Checkout from the Jenkins source repository using https protocol, no credentials, the master branch, and changelog calculation disabled. If changelog is ...
Read more >git-remote Documentation - Git
Be a little more verbose and show remote url after name. ... a symbolic-ref refs/remotes/<name>/HEAD is set up to point at remote's <master>...
Read more >GIT Push and Pull Tutorial - DataCamp
The HTTPS or URL is copied from the given GitHub account, which is the place ... and the master is the branch, name.upstream...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the problem is that we might be trying to be too smart. When it builds in production (the most important build), it all starts with a GitHub Action workflow that runs on a cronjob. It checks out the
master
branch ofmdn/yari
and within that workflow, it checks out themain
branch ofmdn/content
. But I suspect that what’s happening is thatprocess.env.GITHUB_REF
refers to the ref of themdn/yari
branch, not themdn/content
one.I suspect that this function actually dates back to the early days when the build JS code was all in the same repo as the en-US content. Then, it kinda made sense that the
github_url
for each document could be assumed to be same git checkout as that for the code.@tannerdolby This issue might become complex and I intend to take an active role in solving it. But please stick around!
@escattone I’ve labelled this as a milestone blocker.
master
is gone