From 80400f18e7d46f862bb3a6be21df6a0862de775a Mon Sep 17 00:00:00 2001 From: SandPoot Date: Thu, 7 Apr 2022 01:41:07 -0300 Subject: [PATCH] eh, big stuff --- .github/workflows/compile_changelogs.yml | 21 +- html/changelogs/archive/2022-03.yml | 54 ++--- html/changelogs/example.yml | 14 +- tgui/packages/tgui/interfaces/Changelog.js | 11 +- .../github_webhook_processor.php | 3 + tools/changelog/makeChangelog.bat | 4 - tools/changelog/requirements.txt | 4 - tools/changelog/ss13_genchangelog.py | 215 ------------------ tools/ss13_genchangelog.py | 10 +- 9 files changed, 62 insertions(+), 274 deletions(-) delete mode 100644 tools/changelog/makeChangelog.bat delete mode 100644 tools/changelog/requirements.txt delete mode 100644 tools/changelog/ss13_genchangelog.py diff --git a/.github/workflows/compile_changelogs.yml b/.github/workflows/compile_changelogs.yml index a755989b285e..16887148af29 100644 --- a/.github/workflows/compile_changelogs.yml +++ b/.github/workflows/compile_changelogs.yml @@ -11,43 +11,44 @@ jobs: name: "Compile changelogs" runs-on: ubuntu-20.04 steps: - - name: "Check for CHANGELOG_ENABLER secret and pass true to output if it exists to be checked by later steps" + - name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps" id: value_holder env: - CHANGELOG_ENABLER: ${{ secrets.CHANGELOG_ENABLER }} + ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }} run: | unset SECRET_EXISTS - if [ -n $CHANGELOG_ENABLER ]; then SECRET_EXISTS='true' ; fi - echo ::set-output name=CL_ENABLED::${SECRET_EXISTS} + if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi + echo "::set-output name=ACTIONS_ENABLED::$SECRET_EXISTS" - name: "Setup python" - if: steps.value_holder.outputs.CL_ENABLED + if: steps.value_holder.outputs.ACTIONS_ENABLED uses: actions/setup-python@v1 with: python-version: '3.x' - name: "Install deps" - if: steps.value_holder.outputs.CL_ENABLED + if: steps.value_holder.outputs.ACTIONS_ENABLED run: | python -m pip install --upgrade pip python -m pip install pyyaml sudo apt-get install dos2unix - name: "Checkout" - if: steps.value_holder.outputs.CL_ENABLED + if: steps.value_holder.outputs.ACTIONS_ENABLED uses: actions/checkout@v1 with: fetch-depth: 25 - name: "Compile" - if: steps.value_holder.outputs.CL_ENABLED + if: steps.value_holder.outputs.ACTIONS_ENABLED run: | python tools/ss13_genchangelog.py html/changelogs - name: Commit - if: steps.value_holder.outputs.CL_ENABLED + if: steps.value_holder.outputs.ACTIONS_ENABLED run: | git config --local user.email "85452301+Sandstorm-Bot@users.noreply.github.com" git config --local user.name "Sandstorm Bot" git pull origin master + git add html/changelogs git commit -m "Automatic changelog compile [ci skip]" -a || true - name: "Push" - if: steps.value_holder.outputs.CL_ENABLED + if: steps.value_holder.outputs.ACTIONS_ENABLED uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/html/changelogs/archive/2022-03.yml b/html/changelogs/archive/2022-03.yml index f79d4a106992..a2c9d4c6526f 100644 --- a/html/changelogs/archive/2022-03.yml +++ b/html/changelogs/archive/2022-03.yml @@ -1,17 +1,17 @@ 2022-03-03: TripleShades: - - rscadd: [Omega] Windoors to Atmos flaps - - rscadd: [Omega] Windoor to Librarian desk - - rscadd: [Omega] Another belt switch to Cargo - - rscadd: [Omega] Superfluous decals - - rscadd: [Omega] Two space heaters - - rscadd: [Omega] Two empty medkits and health scanners to Robotics - - rscadd: [Omega] More painting mounts in the Library - - remove: [Omega] Superfluous decals - - bugfix: [Omega] Organ Fridge no longer invisibly takes up the tile it was shifted from - - tweak: [Omega] Maint garden is no longer spaced at the cost of losing a puddle - - tweak: [Omega] Moves around the blood crate in Medbay to swap with a vendor - - tweak: [Omega] Moved around Library book shelves" + - rscadd: '[Omega] Windoors to Atmos flaps' + - rscadd: '[Omega] Windoor to Librarian desk' + - rscadd: '[Omega] Another belt switch to Cargo' + - rscadd: '[Omega] Superfluous decals' + - rscadd: '[Omega] Two space heaters' + - rscadd: '[Omega] Two empty medkits and health scanners to Robotics' + - rscadd: '[Omega] More painting mounts in the Library' + - remove: '[Omega] Superfluous decals' + - bugfix: '[Omega] Organ Fridge no longer invisibly takes up the tile it was shifted from' + - tweak: '[Omega] Maint garden is no longer spaced at the cost of losing a puddle' + - tweak: '[Omega] Moves around the blood crate in Medbay to swap with a vendor' + - tweak: '[Omega] Moved around Library book shelves"' 2022-03-04: BongaTheProto: - bugfix: Fixes femcum hydratation @@ -19,8 +19,8 @@ BongaTheProto: - bugfix: Tops will now use the shirt slot TripleShades: - - rscdel: [Omega] Hundreds of decals - - tweak: [Omega] Three airlock rooms to space dont have vents now to stop tiles ripping up + - rscdel: '[Omega] Hundreds of decals' + - tweak: '[Omega] Three airlock rooms to space dont have vents now to stop tiles ripping up' 2022-03-08: Putnam3145: - config: Made a config entry lowertext thing actually work right @@ -48,10 +48,10 @@ - balance: Regenerative cores when used on Synthetics on lavaland now heal for 20 brute + burn instead of 5 - balance: Regenerative cores when used now on lavaland now only heal 5 brute + burn, regardless of whom they are used on. Additionally, their damage slowdown negation is reduced to ten seconds. TripleShades: - - rscdel: [Omega] Engineering Supermatter shortcut airlock to Cooling Loop - - tweak: [Omega] Gravity Generator walkable area" - - bugfix: [Omega] Two Xenobiology pens now have chutes - - bugfix: [Omega] Makes a t-junction pipe in Atmospherics not visible above the floor + - rscdel: '[Omega] Engineering Supermatter shortcut airlock to Cooling Loop' + - tweak: '[Omega] Gravity Generator walkable area"' + - bugfix: '[Omega] Two Xenobiology pens now have chutes' + - bugfix: '[Omega] Makes a t-junction pipe in Atmospherics not visible above the floor' 2022-03-14: Putnam3145: - bugfix: atmos equalization config now works properly @@ -65,8 +65,8 @@ - bugfix: Fixed LOG_VICTIM. 2022-03-18: TripleShades: - - rscadd: [Omega] Aix Mixer pipe - - rscadd: [Omega] Wire to Turbine + - rscadd: '[Omega] Aix Mixer pipe' + - rscadd: '[Omega] Wire to Turbine' 2022-03-20: Melbert: - bugfix: Balloon alerts sourced on turfs work properly. @@ -84,8 +84,8 @@ BlueWildrose: - balance: Xenobiology's Advanced Mutation Toxin has another cure now, which is Mutadone. In addition, it no longer instantly transforms slime subspecies upon contraction. TripleShades: - - rscadd: [Omega] Gravity Generator room scrubber - - tweak: [Omega] tcomms vents are now passive + - rscadd: '[Omega] Gravity Generator room scrubber' + - tweak: '[Omega] tcomms vents are now passive' 2022-03-24: SandPoot: - bugfix: Fixes any sort of crate related syndicate item fetching. @@ -108,11 +108,11 @@ - rscadd: Added cameras to some areas in current rotation stations for parity - rscadd: Added light switches to many areas in current rotation stations - rscadd: Added atmos alarms to a few areas in current rotation stations for parity - - rscadd: [Box] Gives Morgue Maintenance an APC - - rscdel: [Omega] Removes Arrivals Lobby APC since it's now part of the hallway + - rscadd: '[Box] Gives Morgue Maintenance an APC' + - rscdel: '[Omega] Removes Arrivals Lobby APC since it''s now part of the hallway' - bugfix: Fixes a few duplicate c_tags for current rotation ruins and stations - bugfix: Fixes some incorrectly placed areas in current rotation stations - bugfix: Fixes pipes that led to nowhere in current rotation stations - - bugfix: [Box] Kitchen Cold Room should now lose power via proper area connection - - bugfix: [Box] Chief Engineer's Office should no longer be announced as Command erroneously due to mapping error - - bugfix: [Omega] Law Office APC should no longer control the Restrooms + - bugfix: '[Box] Kitchen Cold Room should now lose power via proper area connection' + - bugfix: '[Box] Chief Engineer''s Office should no longer be announced as Command erroneously due to mapping error' + - bugfix: '[Omega] Law Office APC should no longer control the Restrooms' diff --git a/html/changelogs/example.yml b/html/changelogs/example.yml index b0e660681d9f..f37fc68f5412 100644 --- a/html/changelogs/example.yml +++ b/html/changelogs/example.yml @@ -11,16 +11,16 @@ # - (fixes bugs) # wip # - (work in progress) -# qol -# - (quality of life) +# tweak +# - (tweaks something) # soundadd # - (adds a sound) # sounddel # - (removes a sound) -# rscadd -# - (adds a feature) # rscdel # - (removes a feature) +# rscadd +# - (adds a feature) # imageadd # - (adds an image or sprite) # imagedel @@ -29,6 +29,8 @@ # - (fixes spelling or grammar) # experiment # - (experimental change) +# tgs +# - (messing around with tgs) # balance # - (balance changes) # code_imp @@ -41,6 +43,10 @@ # - (makes changes to administrator tools) # server # - (miscellaneous changes to server) +# expansion +# - (expands something) +# qol +# - (quality of life) ################################# # Your name. diff --git a/tgui/packages/tgui/interfaces/Changelog.js b/tgui/packages/tgui/interfaces/Changelog.js index 7b0a27f01692..57a0747b4860 100644 --- a/tgui/packages/tgui/interfaces/Changelog.js +++ b/tgui/packages/tgui/interfaces/Changelog.js @@ -18,25 +18,24 @@ import yaml from 'js-yaml'; const icons = { bugfix: { icon: 'bug', color: 'green' }, wip: { icon: 'hammer', color: 'orange' }, - qol: { icon: 'hand-holding-heart', color: 'green' }, + tweak: { icon: 'wrench', color: 'green' }, soundadd: { icon: 'tg-sound-plus', color: 'green' }, sounddel: { icon: 'tg-sound-minus', color: 'red' }, - add: { icon: 'check-circle', color: 'green' }, - expansion: { icon: 'check-circle', color: 'green' }, - rscadd: { icon: 'check-circle', color: 'green' }, rscdel: { icon: 'times-circle', color: 'red' }, + rscadd: { icon: 'check-circle', color: 'green' }, imageadd: { icon: 'tg-image-plus', color: 'green' }, imagedel: { icon: 'tg-image-minus', color: 'red' }, spellcheck: { icon: 'spell-check', color: 'green' }, experiment: { icon: 'radiation', color: 'yellow' }, + tgs: { icon: 'toolbox', color: 'purple' }, balance: { icon: 'balance-scale-right', color: 'yellow' }, code_imp: { icon: 'code', color: 'green' }, refactor: { icon: 'tools', color: 'green' }, config: { icon: 'cogs', color: 'purple' }, admin: { icon: 'user-shield', color: 'purple' }, server: { icon: 'server', color: 'purple' }, - tgs: { icon: 'toolbox', color: 'purple' }, - tweak: { icon: 'wrench', color: 'green' }, + expansion: { icon: 'check-circle', color: 'green' }, + qol: { icon: 'hand-holding-heart', color: 'green' }, unknown: { icon: 'info-circle', color: 'label' }, }; diff --git a/tools/WebhookProcessor/github_webhook_processor.php b/tools/WebhookProcessor/github_webhook_processor.php index da7e8445e527..506921487f47 100644 --- a/tools/WebhookProcessor/github_webhook_processor.php +++ b/tools/WebhookProcessor/github_webhook_processor.php @@ -832,6 +832,9 @@ function checkchangelog($payload, $compile = true) { $currentchangelogblock[] = array('type' => 'balance', 'body' => $item); } break; + case 'tgs': + $currentchangelogblock[] = array('type' => 'tgs', 'body' => $item); + break; case 'code_imp': case 'code': if($item != 'changed some code'){ diff --git a/tools/changelog/makeChangelog.bat b/tools/changelog/makeChangelog.bat deleted file mode 100644 index 0d9135837e2a..000000000000 --- a/tools/changelog/makeChangelog.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -rem Cheridan asked for this. - N3X -call python ss13_genchangelog.py ../html/changelog.html ../html/changelogs -pause diff --git a/tools/changelog/requirements.txt b/tools/changelog/requirements.txt deleted file mode 100644 index 14c7d0b9683e..000000000000 --- a/tools/changelog/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -PyYAML==6.0 -beautifulsoup4==4.10.0 -ruamel.yaml==0.17.20 -PyGithub==1.55 diff --git a/tools/changelog/ss13_genchangelog.py b/tools/changelog/ss13_genchangelog.py deleted file mode 100644 index 8f292dbe58a8..000000000000 --- a/tools/changelog/ss13_genchangelog.py +++ /dev/null @@ -1,215 +0,0 @@ -''' -Usage: - $ python ss13_genchangelog.py [--dry-run] html/changelog.html html/changelogs/ -ss13_genchangelog.py - Generate changelog from YAML. -Copyright 2013 Rob "N3X15" Nelson -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -''' - -from __future__ import print_function -import yaml, os, glob, sys, re, time, argparse -from datetime import datetime, date, timedelta -from time import time - -today = date.today() - -dateformat = "%d %B %Y" - -opt = argparse.ArgumentParser() -opt.add_argument('-d', '--dry-run', dest='dryRun', default=False, action='store_true', help='Only parse changelogs and, if needed, the targetFile. (A .dry_changelog.yml will be output for debugging purposes.)') -opt.add_argument('-t', '--time-period', dest='timePeriod', default=9, type=int, help='Define how many weeks back the changelog should display') -opt.add_argument('targetFile', help='The HTML changelog we wish to update.') -opt.add_argument('ymlDir', help='The directory of YAML changelogs we will use.') - -args = opt.parse_args() - -all_changelog_entries = {} - -validPrefixes = [ - 'bugfix', - 'wip', - 'tweak', - 'soundadd', - 'sounddel', - 'rscdel', - 'rscadd', - 'imageadd', - 'imagedel', - 'spellcheck', - 'experiment', - 'tgs', - 'balance', - 'code_imp', - 'refactor', - 'config', - 'admin', - 'server' -] - -def dictToTuples(inp): - return [(k, v) for k, v in inp.items()] - -changelog_cache = os.path.join(args.ymlDir, '.all_changelog.yml') - -failed_cache_read = True -if os.path.isfile(changelog_cache): - try: - with open(changelog_cache,encoding='utf-8') as f: - (_, all_changelog_entries) = yaml.load_all(f) - failed_cache_read = False - - # Convert old timestamps to newer format. - new_entries = {} - for _date in all_changelog_entries.keys(): - ty = type(_date).__name__ - # print(ty) - if ty in ['str', 'unicode']: - temp_data = all_changelog_entries[_date] - _date = datetime.strptime(_date, dateformat).date() - new_entries[_date] = temp_data - else: - new_entries[_date] = all_changelog_entries[_date] - all_changelog_entries = new_entries - except Exception as e: - print("Failed to read cache:") - print(e, file=sys.stderr) - -if args.dryRun: - changelog_cache = os.path.join(args.ymlDir, '.dry_changelog.yml') - -if failed_cache_read and os.path.isfile(args.targetFile): - from bs4 import BeautifulSoup - from bs4.element import NavigableString - print(' Generating cache...') - with open(args.targetFile, 'r', encoding='utf-8') as f: - soup = BeautifulSoup(f) - for e in soup.find_all('div', {'class':'commit'}): - entry = {} - date = datetime.strptime(e.h2.string.strip(), dateformat).date() # key - for authorT in e.find_all('h3', {'class':'author'}): - author = authorT.string - # Strip suffix - if author.endswith('updated:'): - author = author[:-8] - author = author.strip() - - # Find