metrics icon indicating copy to clipboard operation
metrics copied to clipboard

fix(app/metrics): private repositories may be always ignored

Open lowlighter opened this issue 2 years ago • 4 comments

A lot of users seems to report that their private repositories are not taken into account, even with a repo scope

lowlighter avatar May 24 '22 16:05 lowlighter

I've noticed that the "Most Used Languages" stats for my metrics are weird, while the basic stats look good.It only analyzed 86 commits from thousand commits. image

When plugin_languages_indepth is enabled, private repositories cannot be cloned even if a token is provided and access is enabled. The action log of debug: yes as follows:

metrics/compute/XXX/plugins > languages > indepth analyzer > failed to clone https://github.com/XXX/REPO(Error: Cloning into '.'...
  fatal: could not read Username for 'https://github.com/': No such device or address
  )

I'm not sure the relationship between them, but I just want to provide some cues for this bug. Thanks for your awesome work!

nico-zck avatar Jul 11 '23 05:07 nico-zck

Hi, I'm trying to set up actions for my own profile and I also ran into the same issues. I took a quick look at the code and the issues seems to be that no token is passed when cloning a repo, causing clones to all private repos to fail:

https://github.com/lowlighter/metrics/blob/master/source/plugins/languages/analyzer/analyzer.mjs#L94

According to this Stackoverflow post, all you need to do is change the URL to include the token.

mia1024 avatar Nov 14 '23 13:11 mia1024

Encountering the same issue myself

ilanRosenbaum avatar Dec 05 '23 20:12 ilanRosenbaum

Just created a PR to fix this: https://github.com/lowlighter/metrics/pull/1579

ilanRosenbaum avatar Dec 06 '23 22:12 ilanRosenbaum