1

I'm unable to find database query for total lines of code in all the bitbucket projects.

Does anyone know database query or REST API to get the total lines of code in all the bitbucket projects?

Thanks in advance.

Yashwanth
  • 163
  • 1
  • 9

2 Answers2

1

There is no way to do this via the REST API as it's not information that either Bitbucket Server nor Bitbucket Cloud tracks currently.

I'm (really) curious though, why would this information be in any way useful?

Rog
  • 4,075
  • 2
  • 24
  • 35
  • Third party services exist that bill based off total lines of code. Static code analysis tools are a good example of this, so this information could be useful to inform pricing for such tools. – rwisch45 Jun 13 '23 at 20:23
0

I don't see an obvious way through the web gui, there's running a script like this on your local copy of the repository as an option.

https://github.com/AlDanial/cloc

user1821961
  • 588
  • 1
  • 10
  • 18