Skip to content

Commit

Permalink
merged_by information has been added
Browse files Browse the repository at this point in the history
  • Loading branch information
shanchenqi committed Jun 11, 2022
1 parent da11403 commit a4d0abf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions perceval/backends/gitee/gitee.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Gitee(Backend):
```
Gitee(
owner='chaoss', repository='grimoirelab',
api_token=[TOKEN-1, TOKEN-2, ...], sleep_for_rate=True,
api_token=[TOKEN-1], sleep_for_rate=True,
sleep_time=300
)
```
Expand Down Expand Up @@ -309,7 +309,6 @@ def __fetch_pull_requests(self, from_date, to_date):
if field == 'user':
pull[field + '_data'] = self.__get_user(pull[field]['login'])

# TODO we need to find a way to find out merged_by information
elif field == 'merged_by':
pull[field + '_data'] = self.__get_user(pull[field]['login'])

Expand Down Expand Up @@ -364,7 +363,7 @@ def __get_pull_merged_by(self, pr_number):
for raw_action_logs in group_raw_action_logs:
action_logs = json.loads(raw_action_logs)
for action_log in action_logs:
if action_log["content"] == "合并了 Pull Request":
if action_log["action_type"] == "merged_pr":
result = action_log["user"]["login"]
break
return result
Expand Down

0 comments on commit a4d0abf

Please sign in to comment.