aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api (follow)
Commit message (Collapse)AuthorAgeLines
* No need to remove headers in GitHub Filter EndpointGravatar Joe Banks2024-04-01-2/+0
|
* Update GitHub Filter endpoint tests for new responseGravatar Joe Banks2024-04-01-2/+4
|
* Don't propagate the status received from Discord to GitHub WebhookGravatar Joe Banks2024-04-01-1/+8
|
* Revert "Bump djangorestframework from 3.14.0 to 3.15.1"Gravatar jchristgit2024-03-31-13/+33
|
* Merge branch 'main' into support-test-keepdbGravatar Xithrius2024-03-30-33/+13
|\
| * Implement adjustments for DRF 3.15Gravatar Johannes Christ2024-03-29-33/+13
| |
* | Support running tests with --keepdb optionGravatar Johannes Christ2024-03-29-4/+11
|/ | | | | | Allow faster local tests by skipping the database re-setup. Only two cases were dependent on hardcoded IDs and already existing data, they have been adjusted appropriately.
* Ensure messages returned for metricity data do not match all excluded channelsGravatar Chris Lovering2024-02-20-3/+3
|
* Merge branch 'main' into mailing-list-modelGravatar Xithrius2024-02-03-15/+11
|\
| * Merge pull request #1186 from python-discord/nplusone-infractions-expandedGravatar jchristgit2023-12-15-8/+7
| |\ | | | | | | Prefetch user and actor in expanded infraction view
| | * Prefetch user and actor in expanded infraction viewGravatar Johannes Christ2023-12-15-8/+7
| | | | | | | | | | | | | | | Prevent N+1 reported by Sentry: https://python-discord.sentry.io/issues/4721126467/?project=2714379&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=90d&stream_index=3
| * | Preload nomination entries in nomination viewsetGravatar Johannes Christ2023-12-15-1/+1
| |/ | | | | | | See https://python-discord.sentry.io/issues/4721508176/?project=2714379&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=90d&stream_index=1
| * insert deleted messages as a BatchGravatar shtlrs2023-12-15-6/+3
| | | | | | | | Sentry is sending an N+1 query alert because of the way we were inserting messages (one by one)
* | Migrate mailing lists to their own API endpointsGravatar Johannes Christ2023-12-17-9/+362
|/ | | | | | Add a new model for the bot to store its mailing list state in, as opposed to the current JSON blob in the BotSetting table. Migrate the existing settings from the BotSetting table into the new model.
* Simplify is_bot_pr_approval logicGravatar Chris Lovering2023-12-12-4/+1
|
* Convert to lower case before checking equalityGravatar Chris Lovering2023-12-12-8/+8
|
* Log a warning when being ratelimtted by GithubGravatar Chris Lovering2023-12-11-0/+25
|
* Unify frozen fields logic into serializer mixin (#1169)Gravatar jchristgit2023-12-11-14/+40
| | | | Additionally, implement frozen fields on the offensive message serializer.
* Implement editing of offensive message records (#1165)Gravatar jchristgit2023-12-11-22/+59
| | | | | | | Allow changing the deletion date of offensive message records in case the bot encounters an error during deletion attempts. Fixes #364. Unblocks python-discord/bot#1013.
* Implement the github-filter worker in the APIGravatar Johannes Christ2023-12-11-1/+161
| | | | | | | | | | | | The current github-filter worker, found at https://github.com/python-discord/workers/blob/main/github-filter/src/index.ts, fails to work at present because Discord's webhook endpoints block Cloudflare's IP ranges from accessing this endpoint. Whilst they use Cloudflare to guard themselves, it seems they do not wish others to use it. Implement it on the site to circumvent IP restrictions and allow to modify the code in Python.
* Add alias "hire" for rule 9Gravatar ~hedy2023-12-08-1/+1
| | | ref: https://discord.com/channels/267624335836053506/429409067623251969/1182407804787626047
* Remove the redirect FilterList on migrationGravatar Chris Lovering2023-09-19-0/+16
| | | | | | | | This redirect filter list does not have any filters, nor does it have a bot implementation. It is something that we were working on, but has been stalled for a while. The presence of this filter list also causes the bot to warn on startup due to it finding a filter list with no implementation. This commit removes the FilterList, which can be added back if/when we support this filter type in bot.
* Add "pay" alias for rule tagGravatar Anonymous2023-08-11-1/+1
|
* Pleasure the style dictatorGravatar Johannes Christ2023-07-24-2/+2
|
* Add new rule aliases (#1007)Gravatar Johannes Christ2023-06-26-4/+4
| | | | | | | | * Correct indent for GPT rule * Add new aliases for rule 4 and 8 See suggestion in #1001. Closes #1001.
* Update code for new linter rulesGravatar Johannes Christ2023-06-21-2/+2
| | | | | | Ignore RUF012, which suggests to add typing.ClassVar to "mutable" class variables (in our case, it complained about the ordering attribute of the `Meta` class within models) - annotating this would be a bit noisy.
* Use the new datetime.UTC alias over datetime.timezone.utcGravatar Chris Lovering2023-05-13-59/+59
|
* Specify file encoding so tests pass on windowsGravatar Chris Lovering2023-05-13-1/+1
| | | | This file has non-cp1252 characters, which is the default on windows, so fails to read the file.
* Fix psycopg3 compatibility in metricityGravatar Johannes Christ2023-05-12-7/+8
|
* Add Django-specific rules for ruffGravatar Johannes Christ2023-05-10-36/+36
|
* Switch to ruff for lintingGravatar Johannes Christ2023-05-10-159/+169
|
* Crosscheck rules between API and static rulesGravatar Johannes Christ2023-04-21-1/+39
|
* update rule 5 (#943)Gravatar Amrou Bellalouna2023-04-16-3/+3
|
* Fix contents and descriptions being too long for their field typeGravatar Boris Muratov2023-04-06-5/+4
|
* Merge pull request #861 from python-discord/new-filter-schemaGravatar Boris Muratov2023-04-06-274/+1774
|\ | | | | New Filtering System
| * Make additional_settings non-null with dict defaultGravatar Boris Muratov2023-04-06-4/+5
| | | | | | | | This makes sure that the value in the DB is always a valid JSON, ensuring the unique constraint will work properly.
| * Add maximum auto-timeout duration validationGravatar Boris Muratov2023-04-05-6/+27
| |
| * Rename additional_field to additional_settingsGravatar mbaruh2023-03-26-18/+21
| |
| * Use consistent quoting styleGravatar mbaruh2023-03-25-36/+36
| | | | | | | | Co-authored-by: Johannes Christ <[email protected]>
| * Specify the common elements in the validation errorsGravatar mbaruh2023-03-25-12/+22
| | | | | | | | Co-authored-by: Amrou <[email protected]>
| * Merge the extra kwargs creation functionsGravatar mbaruh2023-03-25-18/+5
| | | | | | | | Co-authored-by: Amrou <[email protected]>
| * Documentation improvements and fixesGravatar mbaruh2023-03-25-5/+6
| | | | | | | | Co-authored-by: Amrou <[email protected]>
| * Make the unique constraint reversibleGravatar mbaruh2023-03-25-0/+1
| | | | | | | | Co-authored-by: Amrou <[email protected]>
| * Merge branch 'main' into new-filter-schemaGravatar mbaruh2023-03-21-27/+82
| |\
| * | Fix filter serializers for false-y valuesGravatar mbaruh2023-02-11-1/+1
| | | | | | | | | | | | Co-authored-by: GDWR <[email protected]>
| * | Fix documentation and importGravatar mbaruh2023-02-11-9/+8
| | | | | | | | | | | | Co-authored-by: wookie184 <[email protected]>
| * | Update viewsets, fix lintingGravatar mbaruh2023-01-28-192/+428
| | |
| * | Make filter unique constraint use NULLS NOT DISTINCTGravatar mbaruh2023-01-28-26/+34
| | | | | | | | | | | | | | | | | | The existing constraint was ineffective as null values were considered distinct, and so two filters with the same content and no overrides were considered different. This change uses a new PSQL 15 feature unsupported in django currently, and so it is added with raw SQL.
| * | Merge branch 'main' into new-filter-schemaGravatar mbaruh2023-01-27-19/+254
| |\ \
| * | | Update testsGravatar mbaruh2023-01-27-143/+170
| | | |