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

numbers are wrong #11

Closed
yegor256 opened this issue Mar 5, 2024 · 7 comments
Closed

numbers are wrong #11

yegor256 opened this issue Mar 5, 2024 · 7 comments

Comments

@yegor256
Copy link

yegor256 commented Mar 5, 2024

I added the badge to one repo, but the number that it shows is wrong: https://github.com/yegor256/xembly

I'm sure that the right number is what the hosted hoc service is showing: 16K+. Something is wrong with the calculation?

@MikhailEpatko
Copy link
Owner

The action only call the hoc with arguments.
I saw that the numbers on the host and on Github are different.
Perhaps the reason is the different number of branches on host and Github?

@yegor256
Copy link
Author

yegor256 commented Mar 7, 2024

@MikhailEpatko hoc command line tool doesn't work with branches, it only analyzes the master branch

@MikhailEpatko
Copy link
Owner

MikhailEpatko commented Mar 7, 2024

@yegor256 when I start next command on the host:
hoc -d . -s 2000-01-01 -b 2024-03-07 -f int
it returns 412.
The same command in Github workflow on the same project returns 192.
When I added 1 line of code on the host hoc returned 413, in workflow - 193.
After I removed this line the numbers were 412 and 192 again.
The command
hoc -d . -s 2000-01-01 -b 2024-03-07 -f int -e .github -e .idea -e .gitignore -e README.md -e LICENSE
returns 234 and 101.
The command ls -al returns for host and workflow the same:

total 40
drwxr-xr-x 5 runner docker 4096 Mar  7 06:58 .
drwxr-xr-x 3 runner docker 4096 Mar  7 06:58 ..
drwxr-xr-x 8 runner docker 4096 Mar  7 06:58 .git
drwxr-xr-x 3 runner docker 4096 Mar  7 06:58 .github
-rw-r--r-- 1 runner docker   11 Mar  7 06:58 .gitignore
-rw-r--r-- 1 runner docker 1064 Mar  7 06:58 LICENSE
-rw-r--r-- 1 runner docker 1414 Mar  7 06:58 README.md
-rw-r--r-- 1 runner docker 1530 Mar  7 06:58 action.yml
-rwxr-xr-x 1 runner docker 1173 Mar  7 06:58 generate-badge.sh
drwxr-xr-x 2 runner docker 4096 Mar  7 06:58 output-dir

May be hoc returns different numbers for host and Github workflow due to different environment?

@yegor256
Copy link
Author

yegor256 commented Mar 7, 2024

@MikhailEpatko maybe this happens because the default value of fetch-depth of actions/checkout equals to 1?

@MikhailEpatko
Copy link
Owner

@yegor256 I'll check it

MikhailEpatko pushed a commit that referenced this issue Mar 10, 2024
@MikhailEpatko
Copy link
Owner

@MikhailEpatko maybe this happens because the default value of fetch-depth of actions/checkout equals to 1?

Thanks! It was very helpful.

@MikhailEpatko
Copy link
Owner

fixed

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

2 participants