-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add code to calculate first response to issue duration #383
Conversation
There was a problem hiding this 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
grimoire_elk/enriched/github.py
Outdated
@@ -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: |
There was a problem hiding this comment.
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
grimoire_elk/enriched/github.py
Outdated
@@ -249,6 +250,21 @@ def get_project_repository(self, eitem): | |||
repo = eitem['origin'] | |||
return repo | |||
|
|||
def get_time_to_first_reaction(self, item): | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please join lines 254 and 255 as it is done here: https://github.com/chaoss/grimoirelab-perceval/blob/master/perceval/backends/core/discourse.py#L124
5608435
to
00a74ed
Compare
grimoire_elk/enriched/github.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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
00a74ed
to
d6e577a
Compare
@valeriocos @acs I've made the required changes. |
Nice wotk @aswanipranjal |
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.