Skip to content

Spam: allow to mark a project as (non)spam manually #8779

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

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

humitos
Copy link
Member

@humitos humitos commented Dec 21, 2021

This field is used from readthedocs-ext to always return 0 as score when the
project was manually marked as is_spam=False. This way, even if there are some
SpamRules that apply to the project, we can manually tell our system that this
project is valid and remove false positives.

See https://github.com/readthedocs/readthedocs-ext/issues/458

This field is used from readthedocs-ext to always return 0 as score when the
project was manually marked as `is_spam=False`. This way, even if there are some
`SpamRule`s that apply to the project, we can manually tell our system that this
project is valid and remove false positives.

See readthedocs/readthedocs-ext#458
@humitos humitos requested a review from a team December 21, 2021 09:45
@humitos
Copy link
Member Author

humitos commented Jan 3, 2022

There is a doc warning that makes the checks to fail, but it's unrelated to this PR.

@@ -306,6 +306,11 @@ class Project(models.Model):
default=False,
help_text='If checked, do not show advertising for this project',
)
is_spam = models.NullBooleanField(
Copy link
Member

Choose a reason for hiding this comment

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

In https://github.com/readthedocs/readthedocs.org/pull/8717/files#diff-2026582e018afc479271c2c856ebf5163912b778923ab381526f03d3aa2363a3 you are replacing NullBoolean fields with a boolean field that accepts null values, probably better to use a boolean field here.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, this seems useful 👍

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@humitos humitos merged commit b014761 into master Jan 5, 2022
@humitos humitos deleted the humitos/project-is-spam branch January 5, 2022 07:04
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.

3 participants