Skip to content

fix: add gh workflow to report crowdin that needs attention#33

Open
Bilb wants to merge 1 commit into
mainfrom
workflow-crowdin-needs-attention
Open

fix: add gh workflow to report crowdin that needs attention#33
Bilb wants to merge 1 commit into
mainfrom
workflow-crowdin-needs-attention

Conversation

@Bilb

@Bilb Bilb commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines +287 to +288
if resp.status_code >= 400:
sys.exit(f"Discord webhook failed ({resp.status_code}): {resp.text[:300]}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think this code will be hit (r.raise_for_status in request_with_retry throws so we wouldn't get here)

Comment on lines +55 to +58
# Discord limits: 10 embeds/message, 4096 chars/description, 25 fields, 6000
# chars total/message. We stay well under these.
MAX_EMBEDS_PER_MESSAGE = 10
MAX_DESC_CHARS = 3800

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks like the 6000 char limit is based on the combined total across all embeds so if we got a bunch of translations for long strings (eg. Pro) then we could hit it over multiple embeds


def post_to_discord(session, webhook_url, messages):
for payload in messages:
resp = request_with_retry(session, "POST", webhook_url, json=payload)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't know if we want to catch this and post an error message to Discord here?

Just thinking something like the 6000 char limit in my previous comment would result in a 400 error which would fail the run, but I think only the person that triggered the run gets an email (not sure that happens with cron-job based actions)

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.

2 participants