You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/09/22 13:47:51 UTC

[GitHub] [incubator-devlake] xgdyp opened a new pull request, #3166: Add a snapshot structure and add commitLineChange table

xgdyp opened a new pull request, #3166:
URL: https://github.com/apache/incubator-devlake/pull/3166

   
   # Summary
   In This PR,I update a snapshot structure to store each commit code-snapshot.Using this structure,we can get some history message such as who is the previous author in each deleted line,how long do these deleted lines exist and so on. 
   ### Does this close any open issues?
   related to #1771 
   
   ### Screenshots
   ![image](https://user-images.githubusercontent.com/37795442/191763517-116b678a-377a-4569-b994-56c881d50e7a.png)
   This structure is similar to git-import tool in clickhouse repo
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on a diff in pull request #3166: Add a snapshot structure and add commitLineChange table

Posted by GitBox <gi...@apache.org>.
klesh commented on code in PR #3166:
URL: https://github.com/apache/incubator-devlake/pull/3166#discussion_r978243510


##########
plugins/gitextractor/tasks/git_repo_collector.go:
##########
@@ -84,6 +84,16 @@ func CollectGitTags(subTaskCtx core.SubTaskContext) errors.Error {
 	}
 	return repo.CollectTags(subTaskCtx)
 }
+func CollectGitDiffLines(subTaskCtx core.SubTaskContext) errors.Error {

Review Comment:
   Please add an empty between functions



##########
plugins/gitextractor/store/csv.go:
##########
@@ -138,6 +138,10 @@ func (c *CsvStore) CommitFileComponents(commitFileComponent *code.CommitFileComp
 	return c.commitFileWriter.Write(commitFileComponent)
 }
 
+func (c *CsvStore) CommitLineChange(commitLineChange *code.CommitLineChange) errors.Error {
+	return c.commitFileWriter.Write(commitLineChange)

Review Comment:
   This is incorrect, different entities should be written to separate files.
   I also notice the `CommitFileComponents` is writing to the `commit_files.csv`, please fix that as well.



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on pull request #3166: Add a snapshot structure and add commitLineChange table

Posted by GitBox <gi...@apache.org>.
klesh commented on PR #3166:
URL: https://github.com/apache/incubator-devlake/pull/3166#issuecomment-1255760578

   Hi, @xgdyp, thank you very much for the contribution.
   Would you mind fixing the golangci-lint error reported from the Github Action?


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh merged pull request #3166: Add a snapshot structure and add commitLineChange table

Posted by GitBox <gi...@apache.org>.
klesh merged PR #3166:
URL: https://github.com/apache/incubator-devlake/pull/3166


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] xgdyp commented on pull request #3166: Add a snapshot structure and add commitLineChange table

Posted by GitBox <gi...@apache.org>.
xgdyp commented on PR #3166:
URL: https://github.com/apache/incubator-devlake/pull/3166#issuecomment-1255761928

   OK, now I'm fixing 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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] xgdyp commented on pull request #3166: Add a snapshot structure and add commitLineChange table

Posted by GitBox <gi...@apache.org>.
xgdyp commented on PR #3166:
URL: https://github.com/apache/incubator-devlake/pull/3166#issuecomment-1257511450

    hi @klesh , I've done these work. Please review it again,thanks


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org