diff --git a/cmd/gitlab-copy/migration.go b/cmd/gitlab-copy/migration.go index 1ab2214..37d0f40 100644 --- a/cmd/gitlab-copy/migration.go +++ b/cmd/gitlab-copy/migration.go @@ -183,9 +183,9 @@ func (m *migration) migrateIssue(issueID int) error { } // Copy related notes (comments) - notes, _, err := source.Notes.ListIssueNotes(srcProjectID, issue.ID, nil) + notes, _, err := source.Notes.ListIssueNotes(srcProjectID, issue.IID, nil) if err != nil { - return fmt.Errorf("source: can't get issue #%d notes: %s", issue.ID, err.Error()) + return fmt.Errorf("source: can't get issue #%d notes: %s", issue.IID, err.Error()) } opts := &gitlab.CreateIssueNoteOptions{} for j := len(notes) - 1; j >= 0; j-- { @@ -201,7 +201,7 @@ func (m *migration) migrateIssue(issueID int) error { bd := fmt.Sprintf("%s\n\n%s", head, n.Body) opts.Body = &bd } - _, resp, err := target.Notes.CreateIssueNote(tarProjectID, ni.ID, opts) + _, resp, err := target.Notes.CreateIssueNote(tarProjectID, ni.IID, opts) if err != nil { if resp.StatusCode == http.StatusRequestURITooLong { fmt.Printf("target: note's body too long, shortening it ...\n") @@ -372,7 +372,7 @@ func (m *migration) migrate() error { for _, issue := range s { if m.params.From.matches(issue.IID) { - if err := m.migrateIssue(issue.ID); err != nil { + if err := m.migrateIssue(issue.IID); err != nil { log.Printf(err.Error()) } if m.params.From.MoveIssues { diff --git a/cmd/gitlab-copy/stats.go b/cmd/gitlab-copy/stats.go index 924a3e1..1c68c7a 100644 --- a/cmd/gitlab-copy/stats.go +++ b/cmd/gitlab-copy/stats.go @@ -105,7 +105,7 @@ func (p *projectStats) computeIssueNotes(client *gitlab.Client) error { } if len(issues) > 0 { for _, issue := range issues { - notes, _, err := client.Notes.ListIssueNotes(p.project.ID, issue.ID, nil) + notes, _, err := client.Notes.ListIssueNotes(p.project.ID, issue.IID, nil) if err != nil { return false, err }