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

Collect reviews as an input for index 'active' #1

Open
wants to merge 2 commits into
base: github-statistics
Choose a base branch
from

Conversation

InfoHunter
Copy link

Currently only commits are considered as an index of active, this patch
includes other information such as comments and reviews...

Note: This patch is rather rough, feel free to improve/edit/or whatever necessary...

Also, I noticed the active index is calculated based on the weeks which have 'active data', not all 'natural ' weeks in a given date period, is it designed so?

Currently only commits are considered as an index of active, this patch
includes other information such as comments and reviews...

my $date = DateTime->new(year => $year, month => $month, day => $day);
my $desired_dow = 7; # Sunday
$date->subtract(days => ($date->day_of_week - $desired_dow) % 7);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, isn't that equivalent to days => $date->day_of_week % 7 in this case?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, what you suggested is more perl native ;-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I misunderstood you. But yes, that is equivalent to what you wrote...

@levitte
Copy link
Owner

levitte commented Jul 25, 2018

Good catch on setting active for PRs and comments...

@levitte
Copy link
Owner

levitte commented Jul 25, 2018

I'm wondering one thing, though... why not += 1 on the active record? Or focus on intent, do we intend to just record what weeks someone has been active, or also how much they've been active on each week?

@InfoHunter
Copy link
Author

do we intend to just record what weeks someone has been active, or also how much they've been active on each week?

I guess the former one is adequate...

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

Successfully merging this pull request may close these issues.

2 participants