{"action":"created","issue":{"url":"https://api.github.com/repos/coq/coq/issues/1148","repository_url":"https://api.github.com/repos/coq/coq","labels_url":"https://api.github.com/repos/coq/coq/issues/1148/labels{/name}","comments_url":"https://api.github.com/repos/coq/coq/issues/1148/comments","events_url":"https://api.github.com/repos/coq/coq/issues/1148/events","html_url":"https://github.com/coq/coq/pull/1148","id":264602322,"number":1148,"title":"Bugzilla migration script.","user":{"login":"Zimmi48","id":1108325,"avatar_url":"https://avatars2.githubusercontent.com/u/1108325?v=4","gravatar_id":"","url":"https://api.github.com/users/Zimmi48","html_url":"https://github.com/Zimmi48","followers_url":"https://api.github.com/users/Zimmi48/followers","following_url":"https://api.github.com/users/Zimmi48/following{/other_user}","gists_url":"https://api.github.com/users/Zimmi48/gists{/gist_id}","starred_url":"https://api.github.com/users/Zimmi48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zimmi48/subscriptions","organizations_url":"https://api.github.com/users/Zimmi48/orgs","repos_url":"https://api.github.com/users/Zimmi48/repos","events_url":"https://api.github.com/users/Zimmi48/events{/privacy}","received_events_url":"https://api.github.com/users/Zimmi48/received_events","type":"User","site_admin":false},"labels":[{"id":649047024,"url":"https://api.github.com/repos/coq/coq/labels/kind:%20infrastructure","name":"kind: infrastructure","color":"006b75","default":false},{"id":671533163,"url":"https://api.github.com/repos/coq/coq/labels/needs:%20feedback","name":"needs: feedback","color":"d4fff9","default":false},{"id":661181694,"url":"https://api.github.com/repos/coq/coq/labels/needs:%20help","name":"needs: help","color":"fff06a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2017-10-11T14:11:44Z","updated_at":"2017-10-17T15:32:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/coq/coq/pulls/1148","html_url":"https://github.com/coq/coq/pull/1148","diff_url":"https://github.com/coq/coq/pull/1148.diff","patch_url":"https://github.com/coq/coq/pull/1148.patch"},"body":"I'm sharing this script in a pull request mainly to get feedback and contributions for improvement, especially from Python-experts (e.g. @JasonGross).\r\n\r\nAs the comments in the script tell, this is an adaptation of an existing script initially found by @silene.\r\nAs I explained during the WG, one of the core feature of this script is that it preserves the bug IDs of as many bugs as possible (and it postpones the others). The main change I made was to accept non-continuous Bugzilla IDs and use postponed bug reports to fill the holes.\r\n\r\nThe most bothering aspect when using this script in practice is that after adding exactly 300 new issues, GitHub will prevent any more addition for 30 minutes (BTW it does prevent me to submit this PR, not just to open issues through the API). (The original script was certainly used on a much smaller scale and I had to adapt the script so that it tries again after some time elapsed.) Adding 300 issues takes about 13 minutes, so completing the migration will take around 12 hours. While this is not impracticable, a shorter migration period would be better. I'm thus going to write to GitHub support to see whether they can lift this restriction temporarily.\r\n\r\nOther details in the script could be further improved, for instance, the migration from JitterBug to Bugzilla incorrectly marked all the comments pre-dating the migration as coming from the original reporter.\r\nSee an example here: https://github.com/Zimmi48/bugzilla-test-2/issues/1306\r\nThe first reply is wrongly attributed, but further replies are correctly attributed. So the migration date was sometime between 2007-01-23 and 2007-07-20. One improvement could be to detect comments before the migration date and print them differently. (BTW this means that Bugzilla will have lasted more than 10 years!)\r\n\r\nOther possible improvements: save a trace of the migration (what new IDs were given to postponed bugs). This could be used to put correct cross-references between an issue and the previous issues it refers to. In the opposite direction it's much harder, but given how GitHub automatically puts a link to other issues where a given issue was mentioned, we could decide to only copy references to previous issues (and let GitHub handle the rest). (Most cross-references should be both ways.)\r\n\r\nFinally, I adapted the function `github_issues_add` a bit stupidly. It works but it could probably be prettified and made a bit smarter.\r\n\r\nIf you have a patch improving this script, feel free to push directly to this branch, or submit a PR on my fork if you're not sure."},"comment":{"url":"https://api.github.com/repos/coq/coq/issues/comments/337271605","html_url":"https://github.com/coq/coq/pull/1148#issuecomment-337271605","issue_url":"https://api.github.com/repos/coq/coq/issues/1148","id":337271605,"user":{"login":"Zimmi48","id":1108325,"avatar_url":"https://avatars2.githubusercontent.com/u/1108325?v=4","gravatar_id":"","url":"https://api.github.com/users/Zimmi48","html_url":"https://github.com/Zimmi48","followers_url":"https://api.github.com/users/Zimmi48/followers","following_url":"https://api.github.com/users/Zimmi48/following{/other_user}","gists_url":"https://api.github.com/users/Zimmi48/gists{/gist_id}","starred_url":"https://api.github.com/users/Zimmi48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zimmi48/subscriptions","organizations_url":"https://api.github.com/users/Zimmi48/orgs","repos_url":"https://api.github.com/users/Zimmi48/repos","events_url":"https://api.github.com/users/Zimmi48/events{/privacy}","received_events_url":"https://api.github.com/users/Zimmi48/received_events","type":"User","site_admin":false},"created_at":"2017-10-17T15:32:48Z","updated_at":"2017-10-17T15:32:48Z","author_association":"CONTRIBUTOR","body":"Alright, finally managed, not with `re.compile` (couldn't understand the errors it was giving me) but with a solution that was inspired by https://stackoverflow.com/a/12872092/3335288. See last commit (whenever GitHub decides to show it).\r\n\r\nI'm now launching a full scale experiment on https://github.com/coq/bugzilla-migration-testing. Feel free to have a look at the results and make comments. The last 30 minutes or so should be wasted creating fake issues to replicate the issue numbers already taken by PRs on Coq.\r\n\r\nTomorrow the migration should start at 9.30am unless a major problem is detected in the meantime."}}
{"actor":{"display_login":"Zimmi48"}}