Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed lines of code #89

Closed
Tracked by #24
joncodo opened this issue Jul 30, 2021 · 2 comments
Closed
Tracked by #24

Removed lines of code #89

joncodo opened this issue Jul 30, 2021 · 2 comments
Assignees

Comments

@joncodo
Copy link
Contributor

joncodo commented Jul 30, 2021

No description provided.

@joncodo joncodo mentioned this issue Jul 30, 2021
10 tasks
@joncodo joncodo self-assigned this Jul 30, 2021
@joncodo
Copy link
Contributor Author

joncodo commented Jul 30, 2021

Screen Shot 2021-07-30 at 1 36 38 PM

SELECT
  count(id) as "Commits",
  sum(additions) as "Additions",
  sum(deletions) as "Deletions",
  sum(additions - deletions) as "LOC"
FROM gitlab_commits
WHERE
  $__timeFilter(gitlab_commits.committed_date) AND gitlab_commits.project_id = $ProjectId
ORDER BY 1

https://github.com/merico-dev/lake/blob/main/src/plugins/gitlab-pond/src/collector/commits.js

The difference with this one is that it takes into account github stats as well. <url>?with_stats=true.

@UltimateBeaver to review and close

@klesh
Copy link
Contributor

klesh commented Aug 1, 2021

sum(additions - deletions) could produce negative outcome which is problematic when calculating 'Bugs count per 1k LOC'

@hezyin hezyin closed this as completed Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants