piceaTech / node-gitlab-2-github

Migrate Issues, milestones etc from gitlab to github
MIT License
545 stars 133 forks source link

Works, but without any results #51

Closed chraibi closed 5 years ago

chraibi commented 5 years ago

I would like to get my issues from this repository to this one

It seems to work well for me. At least according to the output of the script. Here are the results:

➔ node index.js                                                                                                                                               
==================================                                                                                                                            
Skipping Merge Requests                                                                                                                                       
==================================                                                                                                                            
==================================                                                                                                                            
Transferring Milestones                                                                                                                                       
==================================                                                                                                                            
==================================                                                                                                                            
Transferring Labels                                                                                                                                           
==================================                                                                                                                            
Already exists: bug                                                                                                                                           
Creating: confirmed                                                                                                                                           
Creating: critical                                                                                                                                            
Creating: discussion                                                                                                                                          
Already exists: documentation                                                                                                                                 
Already exists: enhancement                                                                                                                                   
Creating: suggestion                                                                                                                                          
Creating: support                                                                                                                                             
Creating: has attachment                                                                                                                                      
==================================                                                                                                                            
Transferring Issues                                                                                                                                           
==================================                                                                                                                            
Transferring 13 issue
..
Transfer complete!

and here you can see that there is nothing created.

My settings are

module.exports = {
  "gitlab": {
    "url": "https://gitlab.version.fz-juelich.de",
    "token": "TOKEN",
    "projectId": 249
  },
  "github": {
    "owner": "jupedsim",
    "token": "TOKEN",
    "repo": "JPSfire"
  },
  "usermap": {
    "chraibi1": "chraibi",
      "graf2": "ArneGraf",
      "sainho93": "zhong1",
      "tscherniewski1": "Tscherniewski",
      "jaeger1": "gjaeger",
      "schroedter1": "schroedtert",
      "andresen1": "Erik-Andresen",
      "hein1": "hein"
  },
    "projectmap": {
        "JuPedSim/JPSfire": "JuPedSim/JPSfire"
  },

  "conversion": {
    "useLowerCaseLabels": false
  },
  "debug": true,
  "mergeRequests": {
    "logFile": "./merge-requests.json",
    "log": false
  }
}

Any idea would be appreciated.

chraibi commented 5 years ago

I turned out the culprit was in this line

if (settings.debug) return Promise.resolve({data: issue});

I don't know what is this doing, but when I change my settings to debug: false the following line

github.issues.create(props);

is executed and everything works as intended.

ad2ien commented 2 years ago

@chraibi : thanks!