issueRepoCommitHandlerFactory returns a handler that will populate the `issue_commits` and `issue_repo_commits` table the issueCommitsFields is used to filter the fields that should be inserted into the `issue_commits` table
(record map[string]interface{})
| 552 | // issueRepoCommitHandlerFactory returns a handler that will populate the `issue_commits` and `issue_repo_commits` table |
| 553 | // the issueCommitsFields is used to filter the fields that should be inserted into the `issue_commits` table |
| 554 | func (s *Service) issueRepoCommitHandler(record map[string]interface{}) errors.Error { |
| 555 | err := s.dal.CreateWithMap(&crossdomain.IssueRepoCommit{}, record) |
| 556 | if err != nil { |
| 557 | return err |
| 558 | } |
| 559 | // remove fields that not in table `issue_commits` |
| 560 | delete(record, "host") |
| 561 | delete(record, "namespace") |
| 562 | delete(record, "repo_name") |
| 563 | delete(record, "repo_url") |
| 564 | return s.dal.CreateWithMap(&crossdomain.IssueCommit{}, record) |
| 565 | } |
| 566 | |
| 567 | // ImportSprint imports csv file into the table `sprints` |
| 568 | func (s *Service) ImportSprint(boardId string, file io.ReadCloser, incremental bool) errors.Error { |
nothing calls this directly
no test coverage detected