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

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

Closed
mrsdizzie opened this issue Jun 25, 2019 · 9 comments
Closed
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@mrsdizzie
Copy link
Member

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.

@lunny lunny added type/proposal The new feature has not been accepted yet but needs to be discussed first. type/enhancement An improvement of existing functionality labels Jun 26, 2019
@lunny
Copy link
Member

lunny commented Jun 26, 2019

@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.

@lunny lunny mentioned this issue Jul 1, 2019
20 tasks
@jakimfett
Copy link

jakimfett commented Jul 1, 2019

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)?

@lunny
Copy link
Member

lunny commented Jul 1, 2019

@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.

@mrsdizzie
Copy link
Member Author

@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?

@lunny
Copy link
Member

lunny commented Jul 3, 2019

@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.

@mrsdizzie
Copy link
Member Author

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

@techknowlogick
Copy link
Member

@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.

@lunny
Copy link
Member

lunny commented Jul 3, 2019

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

@lunny
Copy link
Member

lunny commented Jul 8, 2019

Closed by #7352

@lunny lunny closed this as completed Jul 8, 2019
@lafriks lafriks modified the milestones: 1.8.4, 1.10.0 Jul 8, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants