Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve Trac comment numbers #7

Closed
mkoeppe opened this issue Sep 24, 2022 · 13 comments
Closed

Preserve Trac comment numbers #7

mkoeppe opened this issue Sep 24, 2022 · 13 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Sep 24, 2022

Currently the script converts Trac comments to GH Issue comments with a header like this:

Comment by @mkoeppe created at 2022-07-04 20:14:00

(sagemath/trac_to_gh#26 (comment))

It would be good to preserve the comment number, for the benefit of external links pointing to specific comments.
For example, we could just include the full original URL:

Comment by @mkoeppe created at 2022-07-04 20:14:00 (original: https://trac.sagemath.org/ticket/34110#comment:4)

Likewise, the script should show the original Trac URL of the ticket.

@dimpase
Copy link
Member

dimpase commented Sep 29, 2022

ok, makes sense.

@kwankyu
Copy link

kwankyu commented Dec 23, 2022

If we create links to trac in the converted issues and comments, then those links will be broken when trac is stopped someday. Is this okay?

@dimpase
Copy link
Member

dimpase commented Dec 23, 2022

the idea is to either rewrite these links, or keep a readonly copy of trac around

@kwankyu
Copy link

kwankyu commented Dec 23, 2022

Why create new links to trac if we rewrite them after migration?

I think it makes sense to embed the original comment number in the migrated comment but embedding a link to the original comment does not (if trac goes down someday)

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 25, 2022

Separate from the question whether we want to display the trac links:

I think we need to keep a mapping (ticket_number, comment_number) -> issue_comment.url so that we can rewrite Trac links to specific comments

@kwankyu
Copy link

kwankyu commented Dec 25, 2022

Yes.

@kwankyu
Copy link

kwankyu commented Dec 25, 2022

After ticket-to-issue migration, would the issues (and comments therein) be editable? If yes, who will have the write permission? The original author?

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 25, 2022

Yes, the original author of the issue or comment -- if we have a github account for them on file.

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 26, 2022

Perhaps we can use markdown anchors in the issue comments. Here we refer to the next comment - comment 4711 using [comment 4711](#comment%3A4711)

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 26, 2022

This is comment 4711: This comment has the anchor, created with <a id='comment:4711'></a>

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 26, 2022

I'm writing these anchors out in 23a993f. Example: https://github.com/sagemath/trac_to_gh/blob/main/Issues-26xxx/26855.md#comment:5

Help welcome with rewriting links in "Replying to [comment:18 jdemeyer]:" etc. to markdown

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 26, 2022

This is working well, thank you!

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 26, 2022

Fixed by #45

@mkoeppe mkoeppe closed this as completed Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants