abeizn commented on code in PR #4985:
URL: 
https://github.com/apache/incubator-devlake/pull/4985#discussion_r1174556990


##########
backend/python/plugins/azuredevops/azuredevops/streams/pull_request_commits.py:
##########
@@ -35,22 +35,11 @@ def collect(self, state, context, parent: GitPullRequest) 
-> Iterable[tuple[obje
             raw_commit["pull_request_id"] = parent.domain_id()
             yield raw_commit, state
 
-    def extract(self, raw_data: dict) -> GitPullRequestCommit:
-        return GitPullRequestCommit(
-            **raw_data,
-            commit_sha = raw_data["commitId"],
-            author_name = raw_data["author"]["name"],
-            author_email = raw_data["author"]["email"],
-            authored_date = raw_data["author"]["date"],
-            committer_name = raw_data["committer"]["name"],
-            committer_email = raw_data["committer"]["email"],
-            commit_date = raw_data["committer"]["date"],
-            additions = raw_data["changeCounts"]["Add"] if "changeCounts" in 
raw_data else 0,
-            deletions = raw_data["changeCounts"]["Delete"] if "changeCounts" 
in raw_data else 0
-        )
-
     def convert(self, commit: GitPullRequestCommit, context) -> 
Iterable[code.PullRequestCommit]:
         yield code.PullRequestCommit(
-            commit_sha=commit.commit_sha,
+            commit_sha=commit.commit_id,
             pull_request_id=commit.pull_request_id,
+            commit_authored_name=commit.author_name,
+            commit_authored_email=commit.author_email,

Review Comment:
   hello camille, I updated it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to