forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changelog Generation | BandaStation (#1012)
## Что этот PR делает Изменяет пути к чейнджлогам в системе ТГ. Кастомизирует окно чейнджлога. По результатам бурного обсуждения в дисе стало ясно, что у системы чейнджлога есть 2 основные проблемы: 1. Изменение чейнджлога в индексированном архивном файле может приводить к конфликтам при мерже апстрима. 2. Изменение чейнджлога происходит с созданием дополнительного коммита. Проблема 1 решается этим ПРом, поскольку чейнджлог лежит в поддиректории. Проблема 2 может решиться наличием отдельной ветки и ленивыми HTTP запросами, но она мне не кажется существенной, особенно с учетом того, что коммиты ТГ уже переносятся в наш мастер `как-есть` и чейнджлог коммиты все равно останутся. ## Тестирование m-dzianishchyts@b15f7eb m-dzianishchyts@9b6bb0b <details><summary>Картинко</summary> <p> ![image](https://github.com/user-attachments/assets/e98a258a-5db6-4fec-8258-22bd96fd0b1e) </p> </details> ## Summary by Sourcery Update changelog paths and customize the changelog window. New Features: - Add a new changelog interface for BandaStation. Build: - Update changelog compilation path. CI: - Update CI workflows to use the new changelog path and always run the changelog generation job when a PR is merged. --------- Co-authored-by: Gaxeer <[email protected]>
- Loading branch information
1 parent
1367bfb
commit 62c8820
Showing
13 changed files
with
429 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
2025-01-18: | ||
AyIong: | ||
- bugfix: Лейтджоин ИИ, больше не будут смотреть на лобби арт и общаться IC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/datum/modpack/changelog | ||
name = "Чейнджлог" | ||
desc = "Кастомизация чейнджлога BandaStation." | ||
author = "Maxiemar" | ||
|
||
/datum/modpack/changelog/initialize() | ||
var/latest_changelog = file("[global.config.directory]/../html/changelogs/bandastation/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml") | ||
GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : 0 //for telling if the changelog has changed recently |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "_changelog.dm" | ||
|
||
#include "code/changelog.dm" | ||
#include "code/changelog_item.dm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/datum/changelog/ui_interact(mob/user, datum/tgui/ui) | ||
ui = SStgui.try_update_ui(user, src, ui) | ||
if (!ui) | ||
ui = new(user, src, "ChangelogBandaStation") | ||
ui.open() | ||
|
||
/datum/changelog/ui_static_data() | ||
var/list/data = list("dates" = list()) | ||
var/static/regex/yml_regex = regex(@"\.yml", "g") | ||
|
||
for(var/archive_file in sort_list(flist("html/changelogs/bandastation/archive/"))) | ||
var/archive_date = yml_regex.Replace(archive_file, "") | ||
data["dates"] = list(archive_date) + data["dates"] | ||
|
||
return data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/datum/asset/changelog_item/New(date) | ||
item_filename = SANITIZE_FILENAME("[date].yml") | ||
SSassets.transport.register_asset(item_filename, file("html/changelogs/bandastation/archive/" + item_filename)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.