piceaTech / node-gitlab-2-github

Migrate Issues, milestones etc from gitlab to github

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to import issues

aman00323 opened this issue · comments

commented

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!

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

@aman00323 @vmucury

What version of TypeScript are you using?

Hi @mrs-electronics

Im using:

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

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

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

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.