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

Add code to calculate first response to issue duration #383

Merged

Conversation

aswanipranjal
Copy link
Contributor

closes chaoss/wg-evolution#8

This PR adds the functionality to calculate the first response to issue duration for an issue/pr by someone other than the user who created the issue/pr and adds it to the enriched index for github data source.

Copy link
Member

@valeriocos valeriocos left a comment

Choose a reason for hiding this comment

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

Thank you @aswanipranjal for the PR.
LGTM. I added just some minor comments. I involve also @acs in the review

@@ -343,6 +359,12 @@ def get_rich_item(self, item):
if 'project' in item:
rich_issue['project'] = item['project']

if issue['comments'] + issue['reactions']['total_count'] == 0:
Copy link
Member

Choose a reason for hiding this comment

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

I would convert the if-then-else block to an if-then one, moving out rich_issue['time_to_first_reaction'] = None and changing the condition accordingly

@@ -249,6 +250,21 @@ def get_project_repository(self, eitem):
repo = eitem['origin']
return repo

def get_time_to_first_reaction(self, item):
"""
Copy link
Member

Choose a reason for hiding this comment

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

@valeriocos valeriocos requested a review from acs June 24, 2018 08:49
@aswanipranjal aswanipranjal force-pushed the add-first-response-to-issue-duration branch from 5608435 to 00a74ed Compare June 24, 2018 09:25
@@ -249,6 +250,20 @@ def get_project_repository(self, eitem):
repo = eitem['origin']
return repo

def get_time_to_first_reaction(self, item):
"""Get the first date at which a comment or reaction was made to the issue by someone
Copy link
Member

Choose a reason for hiding this comment

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

I would use better get_time_to_first_attention. In general we are using attention and not reaction, so it is better to use the same semantic in all places.

…to an issue

This code adds the functionality to calculate the number of days
before a comment or a reaction was made to an issue/pr by someone
other than the user who created that issue/pr.

closes chaoss/wg-evolution#8
@aswanipranjal aswanipranjal force-pushed the add-first-response-to-issue-duration branch from 00a74ed to d6e577a Compare June 25, 2018 08:42
@aswanipranjal
Copy link
Contributor Author

@valeriocos @acs I've made the required changes.

@acs acs merged commit d309144 into chaoss:master Jun 27, 2018
@acs
Copy link
Member

acs commented Jun 27, 2018

Nice wotk @aswanipranjal

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.

GMD: first response to issue duration
3 participants