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

Fix new contributor detection logic #3477

Merged
merged 6 commits into from
Dec 9, 2024

Conversation

mathjazz
Copy link
Collaborator

@mathjazz mathjazz commented Dec 9, 2024

Fix #3476.

I've added a test that checks whether the new contributor notification is sent.

I've also excluded the notification to be sent when project manager makes the contribution to the locale.

In mozilla#2677 we moved the is_new_contributor() after translation.save() call,
which means is_new_contributor() will always return False if it checks
whether the user has not many any contributions yet.
@mathjazz mathjazz requested a review from eemeli December 9, 2024 07:51
pontoon/translations/tests/test_views.py Show resolved Hide resolved
pontoon/translations/views.py Outdated Show resolved Hide resolved
pontoon/base/models/user.py Outdated Show resolved Hide resolved
@mathjazz mathjazz requested a review from eemeli December 9, 2024 08:42
@mathjazz mathjazz merged commit f3603fd into mozilla:main Dec 9, 2024
2 checks passed
@mathjazz mathjazz deleted the new-contributor-notifications-fix branch December 9, 2024 08:54
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.

New contributor notifications are not being sent
2 participants