Skip to content

feat: migrate changelog fetching from Deadlock forums to Steam API#401

Merged
LVL1024 merged 29 commits into
developfrom
feature/steam-patch-notes
Jul 15, 2026
Merged

feat: migrate changelog fetching from Deadlock forums to Steam API#401
LVL1024 merged 29 commits into
developfrom
feature/steam-patch-notes

Conversation

@LVL1024

@LVL1024 LVL1024 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Here is the updated PR description in a markdown codeblock, ready to copy and paste:

Changed from using the forums to the Steam API since the devs don't post patch notes on the forums anymore, they moved to Steam posts. Also removed hero labs code.

What changed:

  • fetch_forum_changelogs()fetch_steam_changelogs(), reads from steam_community_announcements filtered to patchnotes-tagged posts
  • _bbcode_to_text() converts Steam BBCode to plain text (paragraphs, lists, links, images, embeds, plus a catch-all for unknown tags)
  • MD5 hashing (steam_hash) detects when Valve edits a post after publishing. If it changes, the local .txt file is updated silently, and hotfix detection is adjusted to prevent false positives.
  • STEAM_MIGRATION_DATE cut-off (2026-06-04) keeps all historical forum-sourced data intact
  • forum_idsource_id in changelog_configs.json; title, steam_hash fields added
  • feedparser and bs4 dropped from pyproject.toml; tzdata added
  • Removed Hero Lab changelog parsing: The get_gamefile_changelogs() pipeline (~130 lines) parsed citadel_patch_notes_english.json into _HeroLab entries. Devs haven't used Hero Labs in forever.
  • Rewrote the changelog wikitext formatter to group entries under == Items == and == Heroes == sections (with === Hero/Item === and ==== Ability ==== sub-headings) instead of flat bullet points, matching the wiki's Patch Formatter output.
  • Added hide_general to parse_changelogs.py to suppress the General heading on patches with no unclassified bullets.
  • Added Unstable Rift and Rift Trooper to link_targets.json.

Parsed data in deadlock-data PR - Reopen deadbot PR or run deploy workflow for this branch here to reparse the data

@LVL1024 LVL1024 marked this pull request as draft July 3, 2026 18:58
@LVL1024 LVL1024 linked an issue Jul 3, 2026 that may be closed by this pull request
LVL1024 added 8 commits July 3, 2026 19:30
… ability subheaders, and hotfix preservation"

This reverts commit b7dd29c.
Reverts the 3 commits since 26fe3d9:
  - b1994dc feat: exclude Hero Lab entries from reprocessing
  - 9b8de0e TEST: Delete existing notes
  - 7f2e144 feat: enhance changelog processing with pending ID support

Preserves the DRY_RUN env var forwarding fix in docker-compose.yml,
which fixes a pre-existing bug where the variable was set by the
CI workflow but silently dropped at the container boundary.
@LVL1024 LVL1024 force-pushed the feature/steam-patch-notes branch from 6363402 to e20047a Compare July 4, 2026 18:00
@LVL1024 LVL1024 requested a review from hassayag July 9, 2026 13:46

@hassayag hassayag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry I haven't gotten to this sooner. Great to see this has worked nicely. Main thing I am concerned with is getting rid of any old code that was designed specifically for the old RSS feed

Comment thread src/changelogs/parse_changelogs.py Outdated
Comment on lines +132 to +136
is_steam_link = (
'store.steampowered.com/news/' in source_link
or 'steamstore-a.akamaihd.net/news/' in source_link
or 'steamcommunity.com/app/' in source_link
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any circumstance that the link would not be steam if we are pointing to the steam rss feed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Any changelog before 2026-06-04 used the old forum links. But to keep things clean, I just made the parser skip generating wikitext for anything before that migration date entirely.

Comment thread src/changelogs/fetch_changelogs.py Outdated
'is_hero_lab': False,
'title': e.get('title'),
'steam_hash': e['steam_hash'],
'was_edited': True,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interested to know how we would handle edited updates. Would it function with our current hotfix system?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I removed the manual was_edited flag entirely. Now, if Valve edits a post, the bot detects the hash change and silently updates the local .txt file. To prevent false hotfixes when overwriting, I set it so the newly fetched text is treated as the "old text" for comparison. The hotfix system still runs fine, and the wiki stays safe because the uploader skips overwriting the main page (while still appending genuinely new hotfix sections via the separate appender).

final_text += f'\n\n=== Patch {patch_num} ===\n\n{entry_text}'
logger.debug(f'Adding Patch {patch_num} to {date_key}')

# Detect hotfixes - compare new patches against old content

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please be observant what your AI is spitting out, they often strip comments

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, will check it better in the future.

Comment thread src/changelogs/fetch_changelogs.py Outdated
link = existing_config.get('link')
title = existing_config.get('title')
steam_hash = existing_config.get('steam_hash')
elif append_entries:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Correct me if I'm wrong as I'm not that familiar with the changelog side

Is append_entries a remnant of the old forums, which had a main forum post with additional updates added as comments? If so, have you seen a similar thing with their use of steam news?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It was originally for forum comments. But we still need it for Steam in case Valve posts multiple patch notes on the same day. Since the wiki only has one page per date, we still use append_entries to merge them under === Patch N === headers.

Comment thread src/changelogs/fetch_changelogs.py Outdated
Comment on lines +354 to +367
source_id = main_entry['version']
link = main_entry['link']
title = main_entry.get('title')
steam_hash = main_entry.get('steam_hash')
elif existing_config:
source_id = existing_config.get('source_id')
link = existing_config.get('link')
title = existing_config.get('title')
steam_hash = existing_config.get('steam_hash')
elif append_entries:
source_id = append_entries[0]['version']
link = append_entries[0]['link']
title = append_entries[0].get('title')
steam_hash = append_entries[0].get('steam_hash')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(if possible,) I would try to make use an object like {source_id, link, title, steam_hash}, although you would have to deal with the version vs source_id issue

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I collapsed that whole block down by determining the source dict first: source_data = main_entry or existing_config or (append_entries[0] if append_entries else {}). It should handle the version vs source_id key discrepancy.

@LVL1024

LVL1024 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

I also wrapped the Steam API parsing in error handling to prevent malformed news items from crashing the changelog run. Also removed some leftover forum and hero lab code.

@LVL1024

LVL1024 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

Other than fixing any other issues you might spot, we'll have to change the output of the wiki patch uploads to match closer to the formatting used there, as it has been changed.

@LVL1024 LVL1024 requested a review from hassayag July 13, 2026 18:02
@hassayag

Copy link
Copy Markdown
Member

Looks great to me. Make any further changes and set it to ready for review, and I'll give it a final look

@LVL1024 LVL1024 marked this pull request as ready for review July 14, 2026 22:52
hassayag
hassayag previously approved these changes Jul 15, 2026

@hassayag hassayag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems good to me, but part of that is pure faith 😂

@LVL1024 LVL1024 merged commit b64a3a1 into develop Jul 15, 2026
2 checks passed
@LVL1024 LVL1024 deleted the feature/steam-patch-notes branch July 15, 2026 17:36
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.

Fix changelogs

3 participants