You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "izveigor (via GitHub)" <gi...@apache.org> on 2023/02/24 17:49:04 UTC

[GitHub] [incubator-devlake] izveigor opened a new pull request, #4522: refactoring: csv file extension check

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

   ### ⚠️ Pre Checklist
   
   > Please complete _ALL_ items in this checklist, and remove before submitting
   
   - [ ] I have read through the [Contributing Documentation](https://devlake.apache.org/community/).
   - [ ] I have added relevant tests.
   - [ ] I have added relevant documentation.
   - [ ] I will add labels to the PR, such as `pr-type/bug-fix`, `pr-type/feature-development`, etc.
   
   <!--
   Thanks for submitting a pull request!
   
   We appreciate you spending the time to work on these changes.
   Please fill out as many sections below as possible.
   -->
   
   ### Summary
   I think, the function "NewCsvFileWriter" should check an extension (".csv") of a file and invoke an error, if it got wrong filename.
   
   ### Does this close any open issues?
   No
   


-- 
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] mindlesscloud commented on pull request #4522: feat: csv file extension check

Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on PR #4522:
URL: https://github.com/apache/incubator-devlake/pull/4522#issuecomment-1448009714

   I noticed you have modified your PR. Well done!  There is one last step, rebase your code and make sure all commit messages following the conventions


-- 
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] mindlesscloud merged pull request #4522: feat: csv file extension check

Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud merged PR #4522:
URL: https://github.com/apache/incubator-devlake/pull/4522


-- 
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] mindlesscloud commented on a diff in pull request #4522: feat: csv file extension check

Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on code in PR #4522:
URL: https://github.com/apache/incubator-devlake/pull/4522#discussion_r1119501057


##########
backend/helpers/pluginhelper/csv_file_writer.go:
##########
@@ -35,8 +37,12 @@ type CsvFileWriter struct {
 }
 
 // NewCsvFileWriter create a `*CsvFileWriter` based on path to saving csv file
-func NewCsvFileWriter(csvPath string, fields []string) *CsvFileWriter {
+func NewCsvFileWriter(csvPath string, fields []string) (*CsvFileWriter, error) {

Review Comment:
   There is a type `Error` defined in the package `github.com/apache/incubator-devlake/core/errors`, most of DevLake functions return this one instead of the normal `error`. 



-- 
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] mindlesscloud commented on a diff in pull request #4522: feat: csv file extension check

Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on code in PR #4522:
URL: https://github.com/apache/incubator-devlake/pull/4522#discussion_r1119501057


##########
backend/helpers/pluginhelper/csv_file_writer.go:
##########
@@ -35,8 +37,12 @@ type CsvFileWriter struct {
 }
 
 // NewCsvFileWriter create a `*CsvFileWriter` based on path to saving csv file
-func NewCsvFileWriter(csvPath string, fields []string) *CsvFileWriter {
+func NewCsvFileWriter(csvPath string, fields []string) (*CsvFileWriter, error) {

Review Comment:
   There is a type `Error` defined in the package `github.com/apache/incubator-devlake/core/errors`, most of DevLake functions return this one instead of the normal `error`. Would you please modify your code
   to follow the convention? 



-- 
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 #4522: refactoring: csv file extension check

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on PR #4522:
URL: https://github.com/apache/incubator-devlake/pull/4522#issuecomment-1445885589

   PS: would you like to change the commit message by following 
   the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) ?


-- 
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