piceaTech / node-gitlab-2-github

Migrate Issues, milestones etc from gitlab to github
MIT License
559 stars 140 forks source link

Unable to import issues #152

Open aman00323 opened 2 years ago

aman00323 commented 2 years ago

settings.ts

import Settings from './src/settings';

export default {
  gitlab: {
    url: 'https://gitlab.com',
    token: 'glpat-_asdasdasdasdqweqwe',
    projectId: 1111111,
    sessionCookie: 'token',
  },
  github: {
    baseUrl: 'https://github.com',
    // apiUrl: 'https//api.github.mycompany.com',
    owner: 'aman00323',
    token: 'asdasdasdasdadasdasd',
    token_owner: 'aman00323',
    repo: 'asdasdasd-asdas',
    recreateRepo: true,
  },
  s3: {
    accessKeyId: '{{accessKeyId}}',
    secretAccessKey: '{{secretAccessKey}}',
    bucket: 'my-gitlab-bucket',
  },
  usermap: {
  },
  projectmap: {
  },
  conversion: {
    useLowerCaseLabels: true,
  },
  transfer: {
    description: false,
    milestones: false,
    labels: false,
    issues: true,
    mergeRequests: false,
    releases: false,
  },
  debug: true,
  useIssueImportAPI: true,
  usePlaceholderMilestonesForMissingMilestones: true,
  usePlaceholderIssuesForMissingIssues: true,
  useReplacementIssuesForCreationFails: true,
  useIssuesForAllMergeRequests: false,
  filterByLabel: null,
  skipMergeRequestStates: [],
  skipMatchingComments: [],
  mergeRequests: {
    logFile: './merge-requests.json',
    log: true,
  },
} as Settings;

Error

Error during transfer:
TypeError: issues.sort is not a function
    at /home/aman/Desktop/node-gitlab-2-github/src/index.ts:397:19
    at step (/home/aman/Desktop/node-gitlab-2-github/src/index.ts:52:23)
    at Object.next (/home/aman/Desktop/node-gitlab-2-github/src/index.ts:33:53)
    at fulfilled (/home/aman/Desktop/node-gitlab-2-github/src/index.ts:24:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Transfer complete!
vmucury commented 1 year ago

Hi @aman00323 I have the same problem here. Do you have any updates about this case? Thank you!

ddavyMRS commented 1 year ago

@aman00323 @vmucury

What version of TypeScript are you using?

vmucury commented 1 year ago

Hi @mrs-electronics

Im using:

ts-node@10.4.0 │ └── typescript@3.9.10 deduped └── typescript@3.9.10

ddavyMRS commented 1 year ago

What happens if you run npm i -g --save-dev ?

vmucury commented 1 year ago

I run this cmd and the output is: added 1 package in 180ms

VictorrLiu commented 8 months ago

I had this problem as well! There is a whole list of packages versions gitlab-2-github requires. It is much easier to use docker to do that, as they already have a docker container for that.

Just follow the usage steps "Docker": https://github.com/piceaTech/node-gitlab-2-github?tab=readme-ov-file#docker or "Docker with bind mounts": https://github.com/piceaTech/node-gitlab-2-github?tab=readme-ov-file#docker-with-bind-mounts in the README.