Won't transfer issues
I've added all the proper urls, tokens, access keys, usernames, and repo names to settings.js. I've mirrored the repo according to the README instructions. Milestones and tickets transfer just fine. As soon as it gets to transferring issues, I get a 404 error. Any idea what could be going wrong?
So after adding my user to the usermaps section and my repo to the projectmaps section it worked, although from what I understood about the instructions I shouldn't have needed to do that. As I understood it, the usermaps is for other team members (the logged in user has a usermap added automatically) and the projectmap is only if you are using a different name.
I also still ran into an issue where certain issue comments wouldn't migrate. The only error I got was "Could not create Github issue comment". I eventually got everything migrated, but I had to delete those comments from Gitlab.
Hi, The README.md might be out of date regarding that info. how many items where transfered? Is it possible you hit the limit of how many objects can be created with the API of github?
I doubt it. This was a very small project, somewhere in the realm of 25 issues. Whenever I deleted the comment everything else went through just fine. Thankfully the comments I deleted from Gitlab weren't too important. This was a project for which I was the only person working on it so its not like I was deleting other people's input or anything. The comments were mostly there because it gave people looking at it later a better frame of reference for the time frame of my decisions regarding the issues. Some comments transferred over just fine, it was just two or three comments that the transfer app didn't like.
Is this project public so I could try migrating it myself and see the errors? If we can't find anything I'd close the issue as I don't see a way to fix something we can't identify.
Yes the project is public on Gitlab, it's called fundwarrior, I have the same username there. The thing is, it'll probably work fine now since I deleted those comments from my Gitlab repo in order to get it to transfer. Admittedly I should've saved them somewhere, that's my bad. Sounds like there is not enough information to troubleshoot with so you can close the issue if need be.
Sorry to hijack the thread, but I'm seeing a similar problem. For me, it goes through the whole process, and then everything fails with a 404.
Creating pull request: !44 - WIP: Fit script and improved docs.
Could not create pull request: !44 - WIP: Fit script and improved docs.
{ HttpError: Not Found
at response.text.then.message (/private/var/folders/8h/4ldt8h116vv1vlhcl1gr2bfh0000gn/T/tmp.8112.3576.17735.38634/node-gitlab-2-github/node_modules/@octokit/request/lib/request.js:55:27)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HttpError',
status: 404,
headers:
{ 'access-control-allow-origin': '*',
'access-control-expose-headers':
'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': 'default-src \'none\'',
'content-type': 'application/json; charset=utf-8',
date: 'Thu, 04 Jul 2019 20:19:57 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
status: '404 Not Found',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
'x-accepted-oauth-scopes': 'repo',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '0794:447FD:2C77F5D:3787B9B:5D1E5F6C',
'x-oauth-scopes':
'admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, read:packages, repo, user, write:discussion, write:packages',
'x-ratelimit-limit': '5000',
'x-ratelimit-remaining': '4442',
'x-ratelimit-reset': '1562273797',
'x-xss-protection': '1; mode=block' },
request:
{ method: 'PATCH',
url:
'https://api.github.com/repos/apuignav/analysis-tools/issues/44',
headers:
{ accept: 'application/vnd.github.v3+json',
'user-agent':
'node-gitlab-2-github octokit.js/16.1.0 Node.js/10.13.0 (macOS High Sierra; x64)',
authorization: 'token c96fb84d427d5743c1f4a8bba7a2bd5d960561ef',
'content-type': 'application/json; charset=utf-8' },
body: '{"labels":[]}',
request: { timeout: 5000, validate: [Object] } },
documentation_url: 'https://developer.github.com/v3/issues/#edit-an-issue' }
It even fails creating the labels.
I have the usermap and the project map correctly set, I think. Any hints on what could go wrong?
I'm receiving this error as well
I'm getting the following output:
Transferring Issues
==================================
(node:14796) UnhandledPromiseRejectionWarning: StatusCodeError: 404 - {"error":"404 Not Found"}
at new StatusCodeError (C:\code\node-gitlab-2-github\node_modules\request-promise-core\lib\errors.js:32:15)
at Request.plumbing.callback (C:\code\node-gitlab-2-github\node_modules\request-promise-core\lib\plumbing.js:104:33)
at Request.RP$callback [as _callback] (C:\code\node-gitlab-2-github\node_modules\request-promise-core\lib\plumbing.js:46:31)
at Request.self.callback (C:\code\node-gitlab-2-github\node_modules\request\request.js:185:22)
at Request.emit (events.js:210:5)
at Request.EventEmitter.emit (domain.js:476:20)
at Request.<anonymous> (C:\code\node-gitlab-2-github\node_modules\request\request.js:1161:10)
at Request.emit (events.js:210:5)
at Request.EventEmitter.emit (domain.js:476:20)
at IncomingMessage.<anonymous> (C:\code\node-gitlab-2-github\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:299:28)
at IncomingMessage.emit (events.js:215:7)
at IncomingMessage.EventEmitter.emit (domain.js:476:20)
at endReadableNT (_stream_readable.js:1183:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:14796) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:14796) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It is coming from index.js:242
let issues = await gitlabApi.Issues.all({
projectId: settings.gitlab.projectId,
});
It seems to align with OP's issue but 100% not sure if it fits here.
Transfering labels work. Same output in debug mode (so the issue is on GL side?). Tried without usermap and projectmap as well, it's the same. GL token scopes are api, read_repository.
Any advice?
Just to make sure, this is a valid definition of usermap and projectmap, right?
Example:
usermap: {
'username.gitlab.1': 'username.github.1',
'username.gitlab.2': 'username.github.2',
},
projectmap: {
'gitlabgroup/projectname.1': 'GitHubOrg/projectname.1',
'gitlabgroup/projectname.2': 'GitHubOrg/projectname.2',
},
Actual:
usermap: {
'myname': 'myothername',
},
projectmap: {
'myorg/myprojectname': 'myotherorg/myotherprojectname',
},
@spruce I'm not sure if my PR addressed OP's or other's issues. Merging the PR auto-closed this because I referenced my comment in it.
@spruce I tried to update my settings file accordingly with the details given above. I see for some reason there is a '/repos' being added in the get request from github which inturn is returning a 404
@spruce please ignore my previous comment. I was able to successfully upload after i changed github base url from "https://github.com" to "https://api.github.com".
@leggettc18 Is this still open?
I have same problem. Labels and milestones are fine. Merge requests is a bit strange, opened MRs were migrated to Github, but closed MRs were not, though both of them got same error. There is no error with issue, but they were not transferred!
Transferring 0 issues.
DONE creating issues.
Statistics:
Total nr. of issues: 0
Nr. of used placeholder issues: 0
Nr. of used replacement issues: 0
Nr. of issue migration fails: 0
By the way I migrate from very old version of self-hosted gitlab ce (8.7). I tested with gitlab.com and it worked without any problem.
Could not create pull request: !2 - #3 update composer file
HTTPError: Response code 404 (Not Found)
at Request.<anonymous> (C:\myproject\node_modules\got\dist\source\as-promise\index.js:118:42)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_NON_2XX_3XX_RESPONSE',
timings: {
start: 1684999541784,
socket: 1684999541784,
lookup: 1684999541784,
connect: 1684999541789,
secureConnect: 1684999541795,
upload: 1684999541795,
response: 1684999541819,
end: 1684999541820,
error: undefined,
abort: undefined,
phases: {
wait: 0,
dns: 0,
tcp: 5,
tls: 6,
request: 0,
firstByte: 24,
download: 1,
total: 36
}
},
description: '404 Not found'
}
Any update?