Gitea: Proposal: Store original author in database for use with migrated content

Created on 25 Jun 2019  路  9Comments  路  Source: go-gitea/gitea

New migration features are really nice! However, the way we are showing the user who imported the content as the author for everything feels confusing and hard to read, especially with lots of issues/PRs. I think it would be very hard to work on a large repo (like gitea) that has been migrated and shows the same username for every issue and PR.

I'd like to propose using the original author name for templates/display only (not mapping it to another user or anything complicated). Keep it simple but make things much easier to read.

An example of what it might look like:

Old:
Screen Shot 2019-06-25 at 1 26 51 PM

These are confusing, especially when there are dozens of comments. It also makes a link to that user on the local instance even if they don't exist. This also makes it possible for a different person to register somebody else's name and have it maybe look like they made those comments.

Some new ideas:

Screen Shot 2019-06-25 at 1 47 02 PM

Screen Shot 2019-06-25 at 1 47 51 PM

This makes it more clear who wrote the comment and gives a quick visual indication that it was copied over from Github. The username could link to their Github profile, or just nothing at all if that is easier (so people aren't mistakenly taken to a different site). And the avatar should be different than the user who ran the import as well probably.

There are other places we display the name that can change too, but this is just an example of what it might be like to use the real author name. If something like this seems ok, maybe other ideas for this can be discussed here as well.

kinenhancement kinproposal

All 9 comments

@mrsdizzie Good idea. I just gave a simple handler with users and reactions when migrating issues.

To implement your idea, we should add a new column named original_author on table issues and add a orignal_url on repository I think.

Another idea is if you are a site administrator, you could create all the users automatically with random password if you check some options. When you migrating from Github Enterprise to Gitea, it's a useful feature.

I rather like the second of the two new GUI presentation of the imported bits, with the source to the side of the author, @mrsdizzie.

Thoughts on using a slight de-emphasis on the import source, especially if this will eventually allow us to import from one another's instances?
Screenshot from 2019-06-30 23-46-53


@lunny would a user, authenticated with the original source i.e. mirror.gitea.com, or GitHub (via OAuth or similar), be able to interact with their own imported comment(s)?

@jakimfett As my opinion, when a user login gitea instance with github OAuth2(or bind), we can assign the imported comments to that user so that he will have permission manage his comments.

@lunny we should also have original_author on table comments too right? Should we try and store the email too if we are going to try to link with existing accounts in the future?

@mrsdizzie Right, issues and comments should have an extra column original_author and repoisitory should store migrating link or we may have an external table named repo_migration which will store columns of migrated repository, i.e. migrating_url and etc.

I think we cannot got email from github's API. We can link them back to github via login name.

@lunny OK I will try and do a PR for that then

@mrsdizzie We should store user ID too, because Github allows users to change name, and if original user changes name a new user could impersonate them.

@techknowlogick You are right. github API will return id. @mrsdizzie

Closed by #7352

Was this page helpful?
0 / 5 - 0 ratings