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

Fixed trac revision author query. #1780

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sarahboyce
Copy link
Contributor

@sarahboyce sarahboyce commented Nov 26, 2024

A few example commits

This relates to #1744

Once this lands I would expect the fellows to have very large commit counts (as they are the mergers)
Once the data is migrated to be the commit author rather than merger, that should change (see django/code.djangoproject.com#232)

@sarahboyce sarahboyce marked this pull request as ready for review November 26, 2024 14:47
Comment on lines +48 to +49
Q(author__istartswith=f"{user.username} <")
| Q(author__istartswith=f"{user.get_full_name()} <")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is not perfect but was what I could think of based off a few examples that cover most cases and hopefully won't double count 👍

@sarahboyce sarahboyce requested a review from bmispelon November 26, 2024 14:49
@bmispelon
Copy link
Member

bmispelon commented Nov 26, 2024

That's a clever approach, thanks for the PR! ✨

Before reviewing this I want to test locally what Trac ends up storing in Revision.author, and I would also like to see if using trac_user_rlookup = enabled [1] in the config could improve things.

The lookup by username/full name seems a bit brittle, but I don't think I have any better idea unfortunately (Trac's lack of actual user table is again making things difficult).

[1] https://github.com/edgewall/trac/blob/trunk/tracopt/versioncontrol/git/git_fs.py#L321-L328

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

Successfully merging this pull request may close these issues.

2 participants