sagemath / trac-to-github

Script to migrate Trac tickets to GitHub issues and the Trac wiki to markdown. Input: https://trac.sagemath.org/ ➠ Intermediate: https://github.com/sagemath/trac_to_gh ➠ Output: https://github.com/sagemath/sage/issues
https://trac.sagemath.org/ticket/30363
7 stars 5 forks source link

Edit unmapped users #150

Closed kwankyu closed 1 year ago

kwankyu commented 1 year ago

First commit sorts names.

Second commit added all remaining names unknown to Trac to ignored_names (changed from ignored_usernames). In result, the table of unmapped usernames will only contain names known to Trac. The purpose is to create mannequinsagetrac-xxx only if xxx is known to Trac.

Is this a right thing to do?

mkoeppe commented 1 year ago

We cannot just leave unknown users unmapped. This would erase issue events from history, such as in the following output change.

diff --git a/Issues-00xxx/206.md b/Issues-00xxx/206.md
index d54b16ccaaa..65ae3e30d82 100644
--- a/Issues-00xxx/206.md
+++ b/Issues-00xxx/206.md
@@ -3,9 +3,7 @@
 archive/issues_000206.json:
 ```json
 {
-    "assignees": [
-        "https://github.com/sagetrac-agc"
-    ],
+    "assignees": [],
     "body": "If I add a bunch of graphics primitives to a Graphic object using the Graphic append() method, the `__xmax`, `__xmin`, `__ymax`, `__ymin` attributes 
are not updated. Therefore when I try to plot the graphic, nothing shows up. Code for the correct behaviour can be found in the `Graphic.__add__()` method.\n\n\nCo
mponent: **packages: standard**\n\n_Issue created by migration from https://trac.sagemath.org/ticket/206_\n\n",
     "closed_at": "2007-08-19T01:06:34Z",
     "created_at": "2007-01-23T04:46:27Z",
@@ -280,29 +278,12 @@ archive/issue_events_001499.json:

 archive/issue_events_001500.json:
 ```json
-{
-    "actor": "https://github.com/sagetrac-agc",
-    "created_at": "2007-08-19T01:05:57Z",
-    "event": "assigned",
-    "issue": "https://github.com/sagemath/sage/issues/206",
-    "subject": "https://github.com/williamstein",
-    "type": "issue_event",
-    "url": "https://github.com/sagemath/sage/issues/206#event-1500"
-}
-```
-
-
-
----
-
-archive/issue_events_001501.json:
-```json
 {
     "actor": "https://github.com/williamstein",
     "created_at": "2007-08-19T01:06:34Z",
     "event": "closed",
     "issue": "https://github.com/sagemath/sage/issues/206",
     "type": "issue_event",
-    "url": "https://github.com/sagemath/sage/issues/206#event-1501"
+    "url": "https://github.com/sagemath/sage/issues/206#event-1500"
 }
mkoeppe commented 1 year ago

Thank you!

kwankyu commented 1 year ago

Thanks.