aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api (follow)
Commit message (Collapse)AuthorAgeLines
* Update reminder tests for new soft-deleted behaviourGravatar Chris Lovering2024-05-10-3/+10
|
* Soft-delete reminders on DELETE instead of removing entirelyGravatar Chris Lovering2024-05-10-0/+18
|
* Merge branch 'main' into set-elidable-on-run-python-operations-in-migrationsGravatar wookie1842024-04-02-15/+132
|\
| * Merge branch 'main' into add-test-case-drf-3.15-regressionGravatar wookie1842024-04-02-14/+86
| |\
| | * Return BytesIO as fp for mocked HTTP errorsGravatar Johannes Christ2024-04-01-0/+3
| | | | | | | | | | | | Prevent spurious test failures on Solaris systems.
| | * Prefetch the filter_list field in the FilterListSerializerGravatar Joe Banks2024-04-01-1/+1
| | |
| | * Make pure-SQL line in api_user.display_name migration elidableGravatar Joe Banks2024-04-01-1/+1
| | | | | | | | | Co-authored-by: jchristgit <[email protected]>
| | * Update user tests with display_name fieldGravatar Joe Banks2024-04-01-4/+9
| | |
| | * Update user viewset docstrings with display_nameGravatar Joe Banks2024-04-01-3/+11
| | |
| | * Add display_name to serializerGravatar Joe Banks2024-04-01-1/+1
| | |
| | * Add display name to API user modelGravatar Joe Banks2024-04-01-0/+23
| | |
| | * Log failed webhook attempts to stderr in GitHub Webhook FilterGravatar Joe Banks2024-04-01-1/+27
| | |
| | * 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
| | |
| * | Add test case for DRF 3.15 regressionGravatar Johannes Christ2024-03-31-1/+46
| |/
* / Set elidable on RunPython operations in migrationsGravatar Johannes Christ2024-03-31-10/+11
|/ | | | | | Any RunPython operation that only migrated existing data (that is, did not create data) can be safely elided by Django when we run `squashmigrations`.
* 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.