#dev-log

1 messages · Page 36 of 1

ebon magnetBOT
#

Build 20191009.6 succeeded

Requested by

GitHub

Duration

00:01:37

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191009.7 succeeded

Requested by

GitHub

Duration

00:02:20

Build pipeline

Bot

regal archBOT
#

The nickname is supposed to be for the user, not the actor. To be clear, the user is the one which received the infraction. The actor is the one who gave out the infraction. You can see that the actor is already mentioned so there's no need to show their nickname anyway.

Also, I think it'd be better to replace the user's name with a nickname if it's available rather than adding it on a separate line.

Ok, because I muted myself during tests I didn't see the difference

regal archBOT
#

I will change this to a more explicit variant. I've looked around for how to properly test a assertNotRaises situation, since there's no built-in way to do that with unittest, but I'm finding conflicting answers.

Some advise to just run it, like I've done here, and rely on the test resulting in Error if an exception occurs, but other argue, and I think I agree with that, that observing an exception where non should occur should result in a test Failure instead.

One solution wou...

#

The reason we don't need to do anything is because we can't reverse the state of the actual data; we simply don't know what the previous value were. Reversal is necessary if the forward function of RunPython also changed the model itself, since you then have to restore the model to the state prior to the migration.

So, we can't undo the data migration and we don't have to undo structural changes, since we made none.

ebon magnetBOT
#

Build 20191009.8 succeeded

Requested by

GitHub

Duration

00:02:15

Build pipeline

Bot

#

Build 20191009.9 succeeded

Requested by

GitHub

Duration

00:01:58

Build pipeline

Bot

regal archBOT
#

Is it just so future migrations don't break this test (e.g. in the future a check constraint for a kick would be added that it must always be hidden, so line 105 would fail)?

Yes, it's to pin these tests to the point in the migration history we are testing. For our non-migration tests, we always update the tests to reflect the current (i.e., latest) states of the models, but that would not make sense for something that is used specifically to generate data according to an older model.

...

#
  • Migration testing is quite clever. I'm impressed. Nice work!
  • The infractions tests don't strike me as very DRY, though many other tests for the site are probably also guilty of that. Would it be feasible to come up with some functions to make it more DRY, at least for the new infraction tests you've written?
  • While your tests are already thorough, I noticed that MigrationsTestCase does not itself have any tests. Would it be feasible to come up with tests for that? Is it even worth it?
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191009.10 failed

Requested by

GitHub

Duration

00:01:26

Build pipeline

Bot

#

Build 20191009.11 failed

Requested by

GitHub

Duration

00:01:26

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191009.12 succeeded

Requested by

GitHub

Duration

00:01:18

Build pipeline

Bot

regal archBOT
regal archBOT
#

Another idea for this one is to dispatch a cog_ready event inside add_cog. Right now most of the cogs use the on_ready listener to do any async stuff (or not) that needs doing when loading cogs, however, this fails if:

  1. Something needs to be re-done once the cog has been reloaded (eg. fetching + setting a channel/webhook attribute)
  2. The cog is not loaded on startup (for whatever reason) and is loaded later
  3. A background loop is started before on_ready has completed.
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#
[python-discord/bot] New branch created: moderation\-tweaks
ebon magnetBOT
#

Build 20191010.1 succeeded

Requested by

GitHub

Duration

00:01:27

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191010.2 succeeded

Requested by

GitHub

Duration

00:01:41

Build pipeline

Bot

regal archBOT
#

I had a good think about this and sensible ways of dishing up some of the current files into subfolders.
(Names might need a change)

  • Automod: All things that trigger bot messages/reactions without any command - namely antispam.py, the on_message and related parts of bot.py, filtering.py, and token_remover.py. Maybe there's more but that's where I'd start

  • General commands for all to use (that aren't bot, server or site info): doc.py, free.py, reddit.py, `reminders.py...

regal archBOT
#

Closes #354.

  • Requests API tokens on extension init
  • Client ID and Secrets for Reddit API set up in bot constants and config
  • HTTP Requests use the API to receive responses
  • Change User-Agent to be complaint with Reddits API rules (https://github.com/reddit-archive/reddit/wiki/API)

Client_ID and Secret have to be created by an admin (https://www.reddit.com/prefs/apps).
The User-Agent string has to be modified with proper values.
Further commits are going to be needed as this PR w...

ebon magnetBOT
#

Build 20191010.3 failed

Requested by

GitHub

Duration

00:01:02

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191010.4 succeeded

Requested by

GitHub

Duration

00:01:12

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
#

It strikes me that there is some redundancy in this code in terms of loops. The loop inside the else can be used instead of the messages_content comprehension e.g.

posted = False

async for message in messages:
    if message.content == PERIODIC_PING:
        posted = True
        ...

if not posted:
    ...send(PERIODIC_PING)

Note that in this case the history iterator would not need to be flattened.

I think an approach which would be better and still app...

north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20191011.1 succeeded

Requested by

GitHub

Duration

00:01:25

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: user\-left\-log
regal archBOT
ebon magnetBOT
#

Build 20191011.2 succeeded

Requested by

GitHub

Duration

00:02:04

Build pipeline

Bot

ebon magnetBOT
#

Build 20191011.3 succeeded

Requested by

Sebastiaan Zeeff

Duration

00:01:26

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191011.4 succeeded

Requested by

Sebastiaan Zeeff

Duration

00:01:18

Build pipeline

Bot

regal archBOT
#
[python-discord/site] New branch created: simple\-admin\-log\-entry\-view
ebon magnetBOT
#

Build 20191011.1 failed

Requested by

GitHub

Duration

00:01:16

Build pipeline

Site

ebon magnetBOT
#

Build 20191011.2 succeeded

Requested by

GitHub

Duration

00:01:43

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.3 failed

Requested by

GitHub

Duration

00:01:41

Build pipeline

Site

regal archBOT
#

@jchristgit This Safari Pinned Tab icon must be a monochrome and transparent SVG, according to https://realfavicongenerator.net/. It offers several ways to convert the uploaded picture to a fitting format, including to upload a separate transparent PNG and convert it to a solid "shadow", which is what I did.
Probably that caused these small dot artifacts around the shape where we'd have a drop shadow in the original. Maybe there could have been a better approach by preparing a different ico...

#
[python-discord/site] branch deleted: favicons
north knotBOT
ebon magnetBOT
#

Build 20191011.4 succeeded

Requested by

Leon Sandøy

Duration

00:03:13

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.5 succeeded

Requested by

Sebastiaan Zeeff

Duration

00:01:20

Build pipeline

Bot

regal archBOT
#
[python-discord/site] branch deleted: migrate\-nominations\-to\-nominations\-models
north knotBOT
ebon magnetBOT
#

Build 20191011.5 succeeded

Requested by

GitHub

Duration

00:03:06

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.6 failed

Requested by

GitHub

Duration

00:01:35

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.7 succeeded

Requested by

GitHub

Duration

00:01:37

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.6 failed

Requested by

GitHub

Duration

00:01:07

Build pipeline

Bot

regal archBOT
#

This PR is out of date with master and has some conflicts that need to be resolved. @lemonsaurus also rightly noted that we should rather have a solution that's robust instead of one that uses hard coded links for edge cases. Hard coded links will need to be maintained by hand and makes me wonder if more edge cases are going to come up in the future.

#
[python-discord/bot] branch deleted: extensions\-cog
#
[python-discord/branding] New branch created: remove\-logo\-discord\-margin
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20191011.7 succeeded

Requested by

GitHub

Duration

00:03:21

Build pipeline

Bot

#

Build 20191011.8 succeeded

Requested by

GitHub

Duration

00:01:38

Build pipeline

Bot

#

Build 20191011.9 succeeded

Requested by

GitHub

Duration

00:01:49

Build pipeline

Bot

regal archBOT
#

ee71c2c Prepare cogs on cog init & wait for bot ready flag - Jens
8a8ab19 Specify names of "prepare_cog" methods - Jens
ab5d972 Add missing awaits and call bot as attribut - Jens
b57f5c0 Merge remote-tracking branch 'origin/master' in... - MarkKoz
45631e9 Merge pull request #488 from K4cePhoenix/Refact... - jchristgit

#

The logo_discord.svg and .min.svg files had a transparent margin around the logo, instead of being cropped as closely to the content as possible. This made them unsuitable for favicon generation.
I removed this extra space using Inkscape and minified the result again using https://www.svgminify.com/
All PNGs which were generated from the original SVGs had no margin, so they remain as they are.

north knotBOT
ebon magnetBOT
#

Build 20191011.10 succeeded

Requested by

GitHub

Duration

00:02:48

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20191011.13 succeeded

Requested by

GitHub

Duration

00:01:21

Build pipeline

Bot

regal archBOT
#

91a8813 Fix #346: display infraction count after giving... - MarkKoz
e120013 Resolve #357: show ban reason and bb watch stat... - MarkKoz
e118d22 Resolve #458: support exact timestamps as args ... - MarkKoz
184a546 Merge branch 'master' into moderation-tweaks - lemonsaurus
d29be57 Merge branch 'master' into moderation-tweaks - lemonsaurus

#
[python-discord/bot] branch deleted: moderation\-tweaks
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20191011.11 succeeded

Requested by

GitHub

Duration

00:02:54

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20191011.14 succeeded

Requested by

Leon Sandøy

Duration

00:02:46

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20191011.8 failed

Requested by

GitHub

Duration

00:01:16

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.9 failed

Requested by

GitHub

Duration

00:01:11

Build pipeline

Site

#

Build 20191011.10 succeeded

Requested by

GitHub

Duration

00:01:46

Build pipeline

Site

dusk berry
#

f

ebon magnetBOT
#

Build 20191011.12 succeeded

Requested by

GitHub

Duration

00:01:38

Build pipeline

Site

regal archBOT
#
[python-discord/site] branch deleted: simple\-admin\-log\-entry\-view
ebon magnetBOT
#

Build 20191011.15 succeeded

Requested by

GitHub

Duration

00:01:25

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20191011.13 succeeded

Requested by

GitHub

Duration

00:03:04

Build pipeline

Site

regal archBOT
#
[python-discord/site] New branch created: upgrade\-postgresql\-to\-12
#

The commit message contains instructions to upgrade, but here it is for "doppelt hält besser" again, since GitHub nicely pasted it in here:

This might break local PostgreSQL containers with the following error:

postgres_1  | 2019-10-11 20:01:48.772 UTC [1] FATAL:  database files are incompatible with server
postgres_1  | 2019-10-11 20:01:48.772 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 12.0.

You wil...
ebon magnetBOT
#

Build 20191011.15 succeeded

Requested by

GitHub

Duration

00:01:40

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.16 succeeded

Requested by

GitHub

Duration

00:01:29

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: token\-regex\-tweak
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20191011.17 succeeded

Requested by

Leon Sandøy

Duration

00:02:51

Build pipeline

Bot

oak estuaryBOT
#

<@&267628507062992896> WARNING: Unable to get DEFCON settings!

regal archBOT
#

The <p> tags are meant to be for paragraphs. You have paragraphs present but instead use the <p> tag as a content wrap and split paragraphs with <br/><br/>.

I'd suggest using the following structure:

          <p>
            We're a large community focused around the Python programming language.
            We believe anyone can learn to code, and are very dedicated to helping
            novice developers take their first steps into the world of programming. We also...
#

Currently, when a user posts a message with far to many lines (usually a long code block between a couple messages), the user will receive a temporary mute from the bot. I propose that we change that behavior slightly. We keep the check for too many lines, however we add in the check for formatting that the bot also uses to inform them about the Discord formatting.

By doing this, we can instead point users to the hosted hastebin rather than punishing them for not knowing about it.

ebon magnetBOT
#

Build 20191011.16 succeeded

Requested by

GitHub

Duration

00:01:32

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.18 succeeded

Requested by

GitHub

Duration

00:01:35

Build pipeline

Site

regal archBOT
#
[python-discord/site] branch deleted: tizzysaurus\_landing\_page\_text
ebon magnetBOT
#

Build 20191011.20 succeeded

Requested by

GitHub

Duration

00:01:29

Build pipeline

Site

north knotBOT
ebon magnetBOT
#

Build 20191011.21 succeeded

Requested by

GitHub

Duration

00:01:24

Build pipeline

Site

#

Build 20191011.19 succeeded

Requested by

Leon Sandøy

Duration

00:03:00

Build pipeline

Site

regal archBOT
#

We recently decided to migrate the bot's test suite to the unittest framework. One of the main reasons for that decision was that one of our other core repositories, the site repository, uses the test tools Django provides, which are based on unittest. Since we want to have some consistency between our repositories, we decided that it would be better to use unittest for the bot as well.

This draft pull request is the start of that migration and will be our main way of keeping track...

ebon magnetBOT
#

Build 20191011.18 succeeded

Requested by

GitHub

Duration

00:01:17

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191011.22 succeeded

Requested by

GitHub

Duration

00:01:35

Build pipeline

Site

regal archBOT
#
[python-discord/site] branch deleted: fix\-home\-responsive
#
[python-discord/bot] New branch created: bump\-site\-postgres\-to\-12
ebon magnetBOT
#

Build 20191011.19 succeeded

Requested by

GitHub

Duration

00:01:15

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20191011.23 succeeded

Requested by

Leon Sandøy

Duration

00:03:53

Build pipeline

Site

regal archBOT
#

ee18908 Remove transparent margin in logo_discord.svg's - ByteCommander
46f725a Remove transparent margins from logo_solo.svgs too - ByteCommander
793af61 Add logo_solo_flat as variant of solo without d... - ByteCommander
56695ff Make logo_solo_flat.svg square enough for favic... - ByteCommander
aab71e6 Replace old favicons with realfavicongenerator ... - ByteCommander

ebon magnetBOT
#

Build 20191011.20 succeeded

Requested by

GitHub

Duration

00:01:19

Build pipeline

Bot

ebon magnetBOT
#

Build 20191011.21 succeeded

Requested by

GitHub

Duration

00:01:18

Build pipeline

Bot

#

Build 20191011.24 succeeded

Requested by

GitHub

Duration

00:01:29

Build pipeline

Site

regal archBOT
#
[python-discord/site] branch deleted: favicons
north knotBOT
ebon magnetBOT
#

Build 20191011.25 succeeded

Requested by

GitHub

Duration

00:02:58

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191011.26 succeeded

Requested by

GitHub

Duration

00:01:31

Build pipeline

Site

regal archBOT
#
[python-discord/site] branch deleted: upgrade\-postgresql\-to\-12
#
[python-discord/branding] branch deleted: remove\-logo\-discord\-margin
#
[python-discord/bot] branch deleted: bot\-utils\-time\-tests
ebon magnetBOT
#

Build 20191011.23 succeeded

Requested by

GitHub

Duration

00:01:23

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20191011.27 succeeded

Requested by

GitHub

Duration

00:03:02

Build pipeline

Site

north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20191011.22 succeeded

Requested by

GitHub

Duration

00:02:40

Build pipeline

Bot

oak estuaryBOT
ebon magnetBOT
#

Build 20191011.24 succeeded

Requested by

GitHub

Duration

00:01:16

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bump\-site\-postgres\-to\-12
ebon magnetBOT
#

Build 20191011.26 succeeded

Requested by

GitHub

Duration

00:01:21

Build pipeline

Bot

regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20191011.25 succeeded

Requested by

GitHub

Duration

00:02:49

Build pipeline

Bot

oak estuaryBOT
regal archBOT
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20191011.27 succeeded

Requested by

GitHub

Duration

00:02:51

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191011.29 succeeded

Requested by

GitHub

Duration

00:01:26

Build pipeline

Site

regal archBOT
#
  • redirect_output has been adjusted to run the delete_invocation inside a task as the help command will wait for that to run before sending the help or doing anything else.

  • pagination has been adjusted to support deleting the paginated message if cleanup is True, and an optional description that is present through all pages of pagination.

  • The help command has been refactored to subclass commands.HelpCommand. This means that it now supports methods such as `ctx.send_help(ct...

ebon magnetBOT
#

Build 20191012.1 succeeded

Requested by

GitHub

Duration

00:01:12

Build pipeline

Bot

ebon magnetBOT
#

Build 20191012.2 succeeded

Requested by

GitHub

Duration

00:01:31

Build pipeline

Bot

ebon magnetBOT
#

Build 20191012.3 succeeded

Requested by

GitHub

Duration

00:01:20

Build pipeline

Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: sync\-cog\-to\-unittest
#
[python-discord/bot] New branch created: resources\-to\-unittest
#
[python-discord/bot] New branch created: pagination\-tests\-to\-unittest
#
[python-discord/bot] New branch created: rules\-attachment\-tests\-unittest
regal archBOT
#
[python-discord/bot] New branch created: cogs\-antispam\-unittest
#
[python-discord/bot] New branch created: cogs\-security\-unittest
regal archBOT
#
[python-discord/bot] New branch created: cogs\-tokenremover\-unittest
ebon magnetBOT
#

Build 20191012.4 succeeded

Requested by

GitHub

Duration

00:01:30

Build pipeline

Bot

regal archBOT
regal archBOT
oak estuaryBOT
#

<@&267628507062992896> WARNING: Unable to get DEFCON settings!

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20191012.5 succeeded

Requested by

Joseph Banks

Duration

00:02:58

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20191012.6 succeeded

Requested by

GitHub

Duration

00:01:26

Build pipeline

Bot

regal archBOT
#

I don't really understand why actor is searched in a different way than user, so I leaved it the way it was, but instead of doing this:

        actor_id = infraction["actor"]
        guild = self.bot.get_guild(constants.Guild.id)
        actor = guild.get_member(actor_id)

I think this would be better:

       actor_id = infraction["actor"]
       actor = self.bot.get_user(actor_id)

I would be also more consistent.

@jchristgit no more use of <@id>

#

@jchristgit no more use of <@id>

Using .mention is the same as building <@id> yourself though: https://github.com/Rapptz/discord.py/blob/c7a1f5e6e9f18fff3128d67b6d098a4ab842fcb7/discord/user.py#L204-L207

The only exception is that you're also fetching the user now which can make this command very slow due to the rate limiting that endpoint has set. get_user loads from cache.

I think the most simple approach to this is to:

  • Leave the current display of user#discrim as-is
    ...
#

Using .mention is the same as building <@id> yourself though: https://github.com/Rapptz/discord.py/blob/c7a1f5e6e9f18fff3128d67b6d098a4ab842fcb7/discord/user.py#L204-L207

Damn, how could I forget? I said it myself...

Also I am pretty sure that actor.mention relies on it.

The only exception is that you're also fetching the user now which can make this command very slow due to the rate limiting that endpoint has set. get_user loads from cache.

Fetching only if the user i...

regal archBOT
ebon magnetBOT
#

Build 20191012.7 succeeded

Requested by

GitHub

Duration

00:01:28

Build pipeline

Bot

regal archBOT
#

Howdy! This PR is intended to address issue #471 (auto-deleting messages with potentially malicious file attachments). After discussing with @lemonsaurus, it became clear that a new Cog would make for a cleaner implementation, instead of a new rule within the AntiSpam Cog. I'll be happy to elaborate on those reasons if anyone would like further details.

Here's about the simplest implementation I could conceive, using the suggestions made in the issue's notes. Some points for further disc...

ebon magnetBOT
#

Build 20191012.8 failed

Requested by

GitHub

Duration

00:01:36

Build pipeline

Bot

#

Build 20191012.9 succeeded

Requested by

GitHub

Duration

00:01:14

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: show\-trigger\-word
north knotBOT
#

Postgres backup completed!

ebon magnetBOT
#

Build 20191013.1 succeeded

Requested by

GitHub

Duration

00:01:17

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: sync\-cog\-to\-unittest
#
[python-discord/bot] branch deleted: resources\-to\-unittest
regal archBOT
#
[python-discord/bot] branch deleted: rules\-attachment\-tests\-unittest
#
[python-discord/bot] branch deleted: cogs\-antispam\-unittest
#

There are some mock helpers set-up for Bot and Context in tests.helpers that follow the specifications of the objects they're mocking (using the spec parameter of Mock/MagicMock) and have some commonly used attributes already set up (like the author attribute for the Context mock with a Member mock that follows the discord.Member spec and send for the Context mock with an AsyncMock).

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191013.2 succeeded

Requested by

Sebastiaan Zeeff

Duration

00:01:43

Build pipeline

Bot

regal archBOT
regal archBOT
#

Closes #374

This pull request adds the word triggered from the watchlist and a short snippet of the message that contains the trigger to the embed sent to #mod-alerts whenever the filter catches a naughty message.

Rationale from the issue:

Without knowing the trigger word, reading the original content of the message to figure out what it was is unnecessarily difficult. In order to see if moderation action is required, we have to first find what the word was and where it is in t...

ebon magnetBOT
#

Build 20191013.3 succeeded

Requested by

GitHub

Duration

00:01:25

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: eval\-emojis
ebon magnetBOT
#

Build 20191013.4 succeeded

Requested by

GitHub

Duration

00:01:26

Build pipeline

Bot

ebon magnetBOT
#

Build 20191013.5 failed

Requested by

GitHub

Duration

00:01:02

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191013.6 succeeded

Requested by

GitHub

Duration

00:01:23

Build pipeline

Bot

#

Build 20191013.7 succeeded

Requested by

GitHub

Duration

00:01:35

Build pipeline

Bot

regal archBOT
#

Well that's not what MarkKoz says:

Also, I think it'd be better to replace the user's name with a nickname if it's available rather than adding it on a separate line.

I agree with him because adding the nickname to the username will longer too much the line

Well, depends on what the staff deems to be useful information. I was thinking both the nickname and discriminator are not needed because the ID will always be shown anyway.

#

It doesn't look like discord.py will cache the user returned from the API call which isn't ideal. Could we cache it ourselves.

With the caching and error handling, perhaps it's becoming more effort than it's worth. But I think moderators, the ones going to use this command, should be the ones to comment on whether they'd be OK with not displaying names if not in the cache.

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

Yeah, please avoid changing dependencies without first discussing it, especially when you're going to entirely change the release source.

For example, changing things to use v1.3a requires all our docker images and our CI to use git for installing, which we've purposely avoided. It would greatly impact our build times for CI/Docker Images thanks to pipenv version resolution and git installation taking significant extra time.

Slipping this into a PR would also result in our docker image...

regal archBOT
oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20191014.1 succeeded

Requested by

GitHub

Duration

00:02:20

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191014.2 succeeded

Requested by

GitHub

Duration

00:01:54

Build pipeline

Site

regal archBOT
#

That seems reasonable to me.

I think we should factor out the mocking of those Discord "Model" that we use a lot and typically require the same or a very similar set-up. Since it does mean we'd basically have to maintain and test a small discord.py mocking library, I'd say we should restrict it those those base models though. I think that with a set of Member, Guild, Role, Message, TextChannel, Context, Bot, and Role we've covered a lot of things that we typically usr.

#
[python-discord/bot] branch deleted: pagination\-tests\-to\-unittest
#
[python-discord/bot] branch deleted: cogs\-security\-unittest
ebon magnetBOT
#

Build 20191014.1 succeeded

Requested by

Sebastiaan Zeeff

Duration

00:01:46

Build pipeline

Bot

regal archBOT
#
[python-discord/site] branch deleted: \#201\-django\-allauth
#

99bc330 Initial Allauth dependency and settings/urls - gdude2002
8cfff31 Remove accidental static files commit; fix Allauth - gdude2002
b83f1b2 Re-add erroneously removed static files - gdude2002
01c0598 Disable Allauth email verification - gdude2002
99263f6 Add model to map Discord roles to Django permis... - gdude2002

north knotBOT
ebon magnetBOT
#

Build 20191014.3 succeeded

Requested by

GitHub

Duration

00:04:04

Build pipeline

Site

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: unittest\-bot\-constants
#

Migrates test_constants.py to the unittest framework. As with the pytest version, it does not yet test container types.

Note: There is a small, but important logical difference with the pytest version. The pytest version skips the rest of the section once the first container item was encountered within a section. This version isolates the inner iteration over section items using self.subTest, making sure we still check the rest of the items in the section.

regal archBOT
#
[python-discord/site] New branch created: wiki\-permissions\-hotfix
ebon magnetBOT
#

Build 20191014.4 failed

Requested by

GitHub

Duration

00:01:24

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191014.5 succeeded

Requested by

GitHub

Duration

00:02:10

Build pipeline

Site

regal archBOT
#
[python-discord/site] branch deleted: wiki\-permissions\-hotfix
north knotBOT
ebon magnetBOT
#

Build 20191014.6 succeeded

Requested by

GitHub

Duration

00:03:51

Build pipeline

Site

regal archBOT
#

Okay. Can you help me understand why? Not trying to be argumentative, just trying to improve. Is the single loop preferred because iterating twice is simply more expensive? I considered that but thought the readability was better in this case, and that the size of the lists being so small would make it a trivial performance hit.

Is this more like what you'd want to see instead?

rejected_attachments = list()
detected_pyfile = list()
for attachment in message.attachments:
   ...
#
[python-discord/site] New branch created: wiki\-polish
#

This is a small PR in order to bring the wiki back into spec post-Allauth.

Unfortunately, Django-Wiki has insecure defaults for people that have any kind of user account, and assumes that everyone that isn't anonymous must have some kind of editor permission. We've rectified the basics in #285 already at the settings.py level, this just fixes a few frontend issues.

  • Remove the breadcrumb navigation bar (below the main navbar) for users that can't edit
  • Prevent messages from the Dja...
ebon magnetBOT
#

Build 20191014.7 succeeded

Requested by

GitHub

Duration

00:02:19

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20191014.8 succeeded

Requested by

GitHub

Duration

00:01:49

Build pipeline

Site

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191014.2 succeeded

Requested by

GitHub

Duration

00:01:38

Build pipeline

Bot

north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20191014.3 succeeded

Requested by

GitHub

Duration

00:03:07

Build pipeline

Bot

regal archBOT
#

well yeah, it's twice as expensive if you iterate the same list twice. But I also think it has better readability when you avoid the list comprehensions. Consider for example this line:

len([a for a in message.attachments if a.filename.lower().endswith('.py')]) > 0

You'd read this sequentially by saying to yourself "okay, so it's the length of, uh, a list that for every attachment in message.attachment but only if the filename ends with py, a list of items that match this co...

regal archBOT
#
[python-discord/site] branch deleted: wiki\-polish
#
[python-discord/site] branch deleted: favicons
north knotBOT
ebon magnetBOT
#

Build 20191014.9 succeeded

Requested by

GitHub

Duration

00:03:48

Build pipeline

Site

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20191014.10 succeeded

Requested by

GitHub

Duration

00:03:17

Build pipeline

Site

north knotBOT
ebon magnetBOT
#

Build 20191014.4 succeeded

Requested by

GitHub

Duration

00:02:57

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

8a83d68 Move the sync cog tests to unittest. - jchristgit
42abcc5 Move tests.test_resources to unittest. - jchristgit
e1c4f08 Move tests.test_pagination to unittest. - jchristgit
4f22550 Move the rules.attachments module tests to u... - jchristgit [6d3af7c](https://github.com/python-discord/bot/commit/6d3af7ccbc8a0ff0d9657c562707281a3a7c2ee2) Move the antispamcog tests tounittest`. - jchristgit

ebon magnetBOT
#

Build 20191014.5 succeeded

Requested by

Sebastiaan Zeeff

Duration

00:01:21

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191014.6 succeeded

Requested by

GitHub

Duration

00:01:48

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20191014.7 succeeded

Requested by

GitHub

Duration

00:03:03

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

#491 Implemented a command to automatically unlock a given role by it's ID or name, and automatically re-lock after it's been used.

#441 Implemented a role info command.

This issue is to discuss some refinements I had in mind involving these two commands:

  • Adjust role command (from #441) to a command group
  • Add roles alias to role command group
  • Move mention command to sub-command of role
  • Change mention command name to unlock (!role unlock)
  • Add lock comm...
native joltBOT
ebon magnetBOT
#

Build 20191014.8 succeeded

Requested by

GitHub

Duration

00:01:22

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191015.1 succeeded

Requested by

GitHub

Duration

00:01:19

Build pipeline

Bot

regal archBOT
regal archBOT
#

The Discord client will not be able to resolve the name of a mentioned user if the user is not in the cache so it ends up just displaying the ID. Furthermore, the user ID can be copied by right clicking a mention. Therefore, the text in parenthesis should be the user's nickname as plain text instead of their ID.

This will need to account for working with the proxy user object which only has an ID - no name or nickname. In such case, don't display anything in addition to the mention; I don'...

native joltBOT
#
[python-discord/flake8-annotations] New branch created: tox\-rocks
native joltBOT
#
[python-discord/flake8-annotations] branch deleted: tox\-rocks
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191015.2 succeeded

Requested by

GitHub

Duration

00:01:46

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191015.3 succeeded

Requested by

GitHub

Duration

00:01:32

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191015.4 succeeded

Requested by

GitHub

Duration

00:01:48

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: rule\-num
#

This is ready for review. It's pretty massive, but a decent amount of the test files have already been reviewed.

For context:

This is the first phase of getting a nice test coverage for the bot, but there's still a long way to go.

Most of the specific test files have been migrated "as-is", without a lot of changes to their internal testing logic. If you feel that certain tests can be enhanced, feel free to make note of that, but we may postpone the implementation of those enhancem...

ebon magnetBOT
#

Build 20191015.5 succeeded

Requested by

GitHub

Duration

00:01:47

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191015.6 succeeded

Requested by

GitHub

Duration

00:01:42

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: off\-topic\-check
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20191015.7 succeeded

Requested by

GitHub

Duration

00:03:53

Build pipeline

Bot

regal archBOT
regal archBOT
#

With how the symbols are currently loaded to the inventories dict, earlier entries get overwritten by newer ones.
This can have negative impact, most notably when loading the 2to3 tool which overrides things like print, zip or input and returns mostly useless docs to them.
It could be solved by never overwriting existing dict entries, or by defining a list of modules that won't override existing dict entries, to keep cases where it's better to not do it (object as an example)

Sec...

ebon magnetBOT
#

Build 20191015.8 failed

Requested by

GitHub

Duration

00:01:18

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
#

I was planning to get to it if it's approved

On Wed, Oct 16, 2019, 11:32 Atul mishra notifications@github.com wrote:

I would like to work on this.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/python-discord/bot/issues/538?email_source=notifications&email_token=AGFP55DQLGAXVJQN25NOQOLQO3NTLA5CNFSM4JBDE2F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBL2QUA#issuecomment-542615632,
...

#

This is a tracking issue, just for an overview of the functionality needed and a note that I'm working on it.

Now that Allauth is implemented and users can login with Discord, we need to provide a way for users to manage their accounts. The proposal is simple: A user settings page.

This page should include the following, ideally:

  • [ ] A method for linking/unlinking a GitHub account
    • Particular attention needs to be given here to prevent users from actually signing up with a Gi...
ebon magnetBOT
#

Build 20191016.1 failed

Requested by

GitHub

Duration

00:01:22

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191016.2 succeeded

Requested by

GitHub

Duration

00:01:45

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: rule\-num
north knotBOT
ebon magnetBOT
#

Build 20191016.3 succeeded

Requested by

GitHub

Duration

00:03:42

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191016.4 succeeded

Requested by

GitHub

Duration

00:01:38

Build pipeline

Bot

regal archBOT
native joltBOT
native joltBOT
native joltBOT
#

This needs validation, but I believe that the coverage report currently being provided by the CI is only for whatever test environment runs the tests last. While not an immediate issue for the current codebase, as Python 3.8-specific logic starts to be added to the codebase the coverage reported by a single test environment will decrease.

To remedy this, the coverage report should be generated from the combination of reports across all of the test environments.

This will likely be easie...

regal archBOT
native joltBOT
#

Tangentially related to #43 and #47, and a bit of thinking out loud: it might be easier in the long run to reconfigure the Azure pipeline to utilize the tox configuration we’ve generating for local dev

Tox should be able to accomplish pretty much all of the same tasks, and it would make life a bit easier not having to synchronize the tox and azure configurations so the user isn’t getting surprised when they get to CI.

north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20191017.1 succeeded

Requested by

GitHub

Duration

00:01:40

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: fuzzy\-ta
#
[python-discord/bot] branch deleted: fuzzy\-ta
native joltBOT
#
Python 3.7.4
pip 19.2.3 from /opt/hostedtoolcache/Python/3.7.4/x64/lib/python3.7/site-packages/pip (python 3.7)
Package    Version
---------- -------
pip        19.2.3 
setuptools 40.8.0 
WARNING: You are using pip version 19.2.3, however version 19.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

No wheel, setuptools is from February. pip is relatively up to date. I don't see a problem with ensuring that these are up to date...

regal archBOT
#

I'm not sure how to implement it quite the way you've shown without either violating DRY or adding another conditional:

if detected_pyfile or rejected_attachments:
    # Send warning message and delete offending message, etc.

but I have implemented the re-ordering as you've requested to skip the one extra conditional evaluation in the cases where a .py file is attached. I hope I understood you correctly.

ebon magnetBOT
#

Build 20191017.2 succeeded

Requested by

GitHub

Duration

00:01:35

Build pipeline

Bot

regal archBOT
#

That isn't what I meant. Sorry for not being clear. Pseudocode:

for msg in attachments:
    if py_file:
        detected_pyfile = True
        break
    if not whitelisted:
        rejected_attachments = True
        # Don't break! Since the py message takes priority,
        # we should keep checking attachments to see if maybe
        # a later attachment will be a py file.

if detected_pyfile:
    print("Please use paste service..")
elif rejected_attachments:
    pr...
#
[python-discord/bot] branch deleted: cogs\-tokenremover\-unittest
ebon magnetBOT
#

Build 20191017.3 succeeded

Requested by

GitHub

Duration

00:01:38

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20191017.1 succeeded

Requested by

GitHub

Duration

00:04:04

Build pipeline

Site

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191017.1 succeeded

Requested by

GitHub

Duration

00:01:49

Build pipeline

Django Simple Bulma

#

Build 20191017.2 succeeded

Requested by

GitHub

Duration

00:01:47

Build pipeline

Django Simple Bulma

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: fuzzy\-tag\-search
native joltBOT
native joltBOT
regal archBOT
ebon magnetBOT
#

Build 20191018.1 succeeded

Requested by

GitHub

Duration

00:01:27

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
#

I've changed this logic for the UniqueTogetherValidator with a custom message. It works well, although it gives slightly less specific feedback:

'non_field_errors': ['This user already has an active infraction of this type.']

However, since this is generated for a specific infraction payload, that should not really be an issue and the message is unambiguous in the context of the query.

regal archBOT
#

Yes, that can't really be helped unless we want to rollback, add data, apply the migration in each test case. That would increase the running time of the tests by a lot, though. This test is already on the heavy side (although we're talking one to two seconds in the pipeline, which is acceptable in my opinion).

I'll use sensible strings as keys to make it clearer, I think that's the best we can do here.

regal archBOT
#
  • The infractions tests don't strike me as very DRY, though many other tests for the site are probably also guilty of that. Would it be feasible to come up with some functions to make it more DRY, at least for the new infraction tests you've written?

(I still have to look into this.)

  • While your tests are already thorough, I noticed that MigrationsTestCase does not itself have any tests. Would it be feasible to come up with tests for that? Is it even worth it?

I'm not quite su...

north knotBOT
#

Postgres backup completed!

regal archBOT
#

Given that the action is always a PUT request, this may as well just be done here and take parameters for the days and enable/disable.

Perhaps then you could also get rid of action_type and deduce it from the aforementioned arguments. Going with the assumption that the days would never be updated to 0, could "updated" be when enabled = True and days = 0? An alternative is to keep action_type and not have an enabled parameter since I think it's easy to deduce that value from the ...

ebon magnetBOT
#

Build 20191019.1 succeeded

Requested by

GitHub

Duration

00:01:51

Build pipeline

Django Crispy Bulma

#

Build 20191019.1 succeeded

Requested by

GitHub

Duration

00:01:34

Build pipeline

Bot

regal archBOT
#
[python-discord/site] New branch created: bot\#466\-reminder\-jump\_url
ebon magnetBOT
#

Build 20191019.2 succeeded

Requested by

GitHub

Duration

00:01:36

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191019.3 failed

Requested by

GitHub

Duration

00:01:21

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191019.4 succeeded

Requested by

GitHub

Duration

00:01:36

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191019.5 succeeded

Requested by

GitHub

Duration

00:01:33

Build pipeline

Bot

ebon magnetBOT
#

Build 20191019.6 succeeded

Requested by

GitHub

Duration

00:01:31

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191019.1 succeeded

Requested by

GitHub

Duration

00:02:21

Build pipeline

Site

regal archBOT
regal archBOT
#
[python-discord/site] New branch created: allauth\-user\-settings
#
[python-discord/bot] New branch created: pluralize\-infraction\-ngettet\-gettet\-\-import
ebon magnetBOT
#

Build 20191019.7 succeeded

Requested by

GitHub

Duration

00:01:30

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20191019.2 succeeded

Requested by

GitHub

Duration

00:02:08

Build pipeline

Site

regal archBOT
#
[python-discord/bot] branch deleted: pluralize\-infraction\-ngettet\-gettet\-\-import
ebon magnetBOT
#

Build 20191019.8 succeeded

Requested by

GitHub

Duration

00:01:37

Build pipeline

Bot

north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20191019.9 succeeded

Requested by

GitHub

Duration

00:03:19

Build pipeline

Bot

#

Build 20191019.10 failed

Requested by

GitHub

Duration

00:01:20

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20191019.3 succeeded

Requested by

GitHub

Duration

00:02:09

Build pipeline

Site

regal archBOT