MCPcopy
hub / github.com/apache/devlake / ImportIssueCommit

Method ImportIssueCommit

backend/plugins/customize/service/service.go:200–209  ·  view source on GitHub ↗

ImportIssueCommit imports csv file into the table `issue_commits`

(boardId string, file io.ReadCloser)

Source from the content-addressed store, hash-verified

198
199// ImportIssueCommit imports csv file into the table `issue_commits`
200func (s *Service) ImportIssueCommit(boardId string, file io.ReadCloser) errors.Error {
201 err := s.dal.Delete(
202 &crossdomain.IssueCommit{},
203 dal.Where("issue_id IN (SELECT issue_id FROM board_issues WHERE board_id=? AND issue_id NOT IN (SELECT issue_id FROM board_issues WHERE board_id!=?))", boardId, boardId),
204 )
205 if err != nil {
206 return err
207 }
208 return s.importCSV(file, boardId, s.issueCommitHandler)
209}
210
211// ImportIssueRepoCommit imports data to the table `issue_repo_commits` and `issue_commits`
212func (s *Service) ImportIssueRepoCommit(boardId string, file io.ReadCloser, incremental bool) errors.Error {

Callers 1

Calls 2

importCSVMethod · 0.95
DeleteMethod · 0.65

Tested by 1