kibble-scanners icon indicating copy to clipboard operation
kibble-scanners copied to clipboard

Not picking up default branch on repos that have a non standard name for their default branch

Open sharanf opened this issue 2 years ago • 2 comments

I am running through the list of sources in the Kibble Demo that have not been processed and are showing the error message

Could not sync with source
Exception: No default branch was found in this repository

Taking a look at the github repos there are default branches but the names of these are not 'main' (or previously 'master').

Some current examples of the source repos producing this error are in the Kibble demo are:

  • https://github.com/apache/directory-scimple.git
  • https://github.com/apache/couchdb-triq.git
  • https://github.com/apache/cloudstack-cloudmonkey.git
  • https://github.com/apache/fineract-cn-anubis.git
  • https://github.com/apache/fineract-cn-accounting.git
  • https://github.com/apache/geode-benchmarks.git
  • https://github.com/apache/incubator-bluemarlin.git
  • https://github.com/apache/incubator-parquet-format.git
  • https://github.com/apache/incubator-streams-examples.git
  • https://github.com/apache/isis-app-demo.git
  • https://github.com/apache/jmeter-site-preview.git
  • https://github.com/apache/nutch-site.git
  • https://github.com/apache/ozone-docker.git
  • https://github.com/apache/tomee-jakartaee-api.git

I will add more examples as I come across them. I suspect there is some scanner logic about locating the default branch that may need to be updated.

sharanf avatar Mar 20 '22 16:03 sharanf

A simple method to find the default branch would be to read the .git/HEAD file and cut out the refs/heads/ part. I've done this recently with Snoot and it works well.

Humbedooh avatar Mar 20 '22 19:03 Humbedooh

Thanks for the tip. I'll do some investigations.

sharanf avatar Mar 24 '22 19:03 sharanf