inveniosoftware / invenio-github

GitHub integration for Invenio.
https://invenio-github.readthedocs.io
MIT License
6 stars 26 forks source link

Create Citation.cff points to no longer default branch "MASTER" #92

Open ppanero opened 2 years ago

ppanero commented 2 years ago

Browser & OS: Chrome96: Windows 10

Describe the bug

A clear and concise description of what the bug is. New github repositories does not have the MASTER branch, rather MAIN. The badge for the "Create CITATION.rff" on github repository settings still points to the MASTER-branch, giving a not-found condition

Steps to Reproduce

  1. Visit Settings for github repository without an attached Citation.cff-file ( my case: https://zenodo.org/account/settings/github/repository/bjartelund/PsychOrNot#)
  2. Attempt to create one by pressing the "Create CITATION.cff" badge leads to not found page (404) on GitHub. zenodo404-github

I tried skimming through the github page to make a patch, but could not find this code.

Expected behavior

Should lead to the create new file page of github

Additional context

The problem is in the hardcoded master in this line.

Kudos to @bjartelund