| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| |\
| |
| | |
Replace OMDB with TMDB
|
| | | |
|
| | |\
| |/
|/| |
|
| |\ \
| | |
| | | |
Make prideavatar support specifying the image by URL
|
| | |\ \
| |/ /
|/| | |
|
| |\ \ \
| | | |
| | | | |
Sentry SDK version bump, integrations adding and Sentry release workflow
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | | |
Co-authored-by: Joe Banks <[email protected]>
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |/ / / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
python-discord/sebastiaan/advent-of-code/refactor-background-tasks
Refactor Advent of Code background tasks to account for deseasonification
|
| | |\ \ \
| |/ / /
|/| | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The Advent of Code Status Countdown task needs to wait for two things to
happen to prevent it from failing during the startup sequence:
1. The Websocket instance discord.py creates needs to be available as
an attribute of the bot, otherwise discord.py fails internally:
Traceback (most recent call last):
File "discord/client.py", line 1049, in change_presence
await self.ws.change_presence(
activity=activity, status=status, afk=afk
)
File "advent_of_code/_cog.py", line 52, in countdown_status
await bot.change_presence(activity=discord.Game(playing))
AttributeError: 'NoneType' object has no attribute 'change_presence'
2. Allegedly, according to the discord.py community, trying to change
the status too early in the sequence to establish a connection with
Discord may result ub the Discord API aborting the connection.
To solve this, I've added a `wait_until_guild_available` waiter, as it
guarantees that the websocket is available and the connections is
mature.
Kaizen: I've changed the name `new_puzzle_announcement` to
`new_puzzle_notification` to better reflect its function.
|
| | |\ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | | |
# Conflicts:
# bot/exts/christmas/advent_of_code/_cog.py
# bot/exts/christmas/advent_of_code/_helpers.py
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, our Advent of Code background tasks fail without logging
errors or printing error messages. This makes it difficult to debug the
errors and means that they may fail silently.
While we should ideally find the root cause that hides such errors, I've
added a done_callback function in the meantime to help us debug the
current issues with the Advent of Code Notification Task.
|
| |\ \ \ \
| | | | |
| | | | | |
Aoc2020
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
AOC_WHITELIST was changed to AOC_WHITELIST_RESTRICTED because it is
clearer that commands
with this parameter in the `@override_in_channel()` decorator
will be restricted to the aoc commands channel and not be
allowed in the main aoc channel.
In the same vein, AOC_WHITELIST_PLUS was changed to AOC_WHITELIST.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Changes the default value of the advent_of_code_commands constant to be
the same channel ID as sir-lancebot-commands. If no AoC commands channel
is set in the .env file, it'll re-direct people to sir-lancebot-commands
instead.
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Please -= 1
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Per Mark's comment, re-raising the error isn't necessary.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I'm a bit ahead of the game and changing the error handler to match
the new style that Iceman will PR shortly.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If any of the "spammier" commands (stats, leaderboard) are used within
the primary advent of code channel, rather than a non-specific embed
we instead reply with the channel they should be using.
This also adds a "AOC_WHITELIST_PLUS" constant that makes it easier to
adjust what channels the non-spammier aoc commands can be used in.
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Commands like `.aoc leaderboard` and `.aoc stats` proved to be spammy
in the main advent of code channel.
An aoc_commands channel has been added for aoc commands
and this update prohibits aoc commands from being used in the primary
aoc channel and adds the comands channel to the whitelist.
This also specifically allows the less spammier commands: join,
subscribe, unsubscribe, and countdown in the primary channel to foster
discussion though.
|
| |\ \ \ \
| | | | |
| | | | | |
Modify error handler check for locally handled errors.
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Also, remove error handler for get_command and video_command.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
local error handler no longer checks for BadArgument error and the
attribute handled will be set to True on the error if an OSError occurs.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Error handler now checks if the error has the attribute "handled" for
locally handled errors.
|
| | | | | |
| | | | |
| | | | | |
We need to upload PR artifacts regardless of our lint job failing. As GitHub Actions uses an implicit "success" status function if you don't specify one of your own, we need to include the "always" function in our condition.
|
| | | | | |
| | | | |
| | | | | |
With the new `workflow_run` setup, we need to make sure that we don't try to send an embed for a skipped workflow. This would be noisy and does not add a lot of useful information.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
A workflow run with a `workflow_run` payload does not contain the
necessary information to build a PR embed. As the old method of using
the API to fetch the relevant information turned out to be fragile (read
note 1 below) and the original Lint workflow already contains the
`pull_request` payload, we now store it as a build artifact.
The embed workflow then fetches the artifact and parses it to get the
relevant information out of it.
---
Note 1: Unfortunately, filtering Pull Requests using the "head"
parameter of the ``/repos/{owner}/{repo}/pulls` endpoint does not work
if the PR belongs to a fork with a different name than the base
repository: the API request will just return an empty array.
I've contacted GH to ask if this was intended or if it's a glitch, but,
for now, it's not a route that's easily available.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I've changed the way we send status embeds to make it work for PRs made
from forks without potentially exposing secrets. Instead of using the
initial workflows to send the embed, I've created a `workflow_run`
workflow that always runs in the context of the base repository.
And added benefit is that we don't have to add the status embed step to
two separate workflows.
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
Use custom status embeds for workflow runs
|
| | |\ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| |\ \ \ \ \ \ |
|
| | | | | | | | |
|
| |/ / / / / / |
|
| |/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit introduces enhanced status embeds for workflow runs that
give more information about run that just ended. An added advantage is
that we can disable the default "give me everything"-setting of GitHub
and fine tune when we want to send embeds.
This allows us to only send an embed for the `lint->build` sequence when
the sequence ends (e.g. in the end when done or after an intermediate
step due to failure/cancellation).
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Unfortunately, an expired session cookie wreaked havoc to our Advent of
Code commands: All commands that relied on leaderboard data failed
because we couldn't refresh our data and the cache had expired.
To mitigate an expired session, I've added a fallback session feature
that enables us to try again with a different session. While it will
issue an error message to inform us to refresh the expired session
cookie, it does mean that the functionality should continue to work in
the mean time.
The fallback session cookie is currently set to my session cookie, using
an environment variable, `AOC_FALLBACK_SESSION`. It is important that
the user connected to the session is a member of all boards and that
it's a fresh session: We don't want our fallback to expire!
At the same time, while a single fallback session works, the AoC website
also does not like too many requests from a single user. That's why
we'll still use a multi-session model under normal circumstances.
To check for expired sessions, I've added a URL check: The Advent of
Code website will silently redirect people with an expired session,
issuing an 200: OK status as usual. The only way to really check for it
is by comparing the final URL in the response object to the URL we set
out to GET. I've added a custom exception to signal such an unexpected
redirect.
Finally, instead of having the commands just break, I've added an
Exception signal that propagates back to the caller. The solution, with
try-except, is a bit hacky and could benefit from an actual error
handler, but I wanted to get things fixed first; polish can be added
later.
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To mitigate problems due to expiring session cookies, I'm currently in
the process of adding support for a fallback cookie. Basically, my
Advent of Code account is a member of *all* leaderboards, which means
that my cookie can be used to fetch all leaderboards as well.
As my session cookie should not expire until after the event, it should
not give us any issues. However, to avoid issues with issuing too many
requests from one session, we should still make sure to set individual
session values regardless of the mitigation.
|