Merge 1.18 into 1.19.2

This commit is contained in:
embeddedt 2023-07-11 22:13:39 -04:00
commit f715a0c8a3
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
3 changed files with 49 additions and 0 deletions

21
.github/workflows/wiki_update.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: update-wiki
on:
push:
branches:
- '1.**'
jobs:
wikigen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: python3 scripts/gen-markdown-patchlist.py
- name: Upload generated file to wiki
uses: SwiftDocOrg/github-wiki-publish-action@v1
with:
path: "doc/generated"
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.WIKI_TOKEN }}

1
doc/generated/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.md

View File

@ -0,0 +1,27 @@
#!/usr/bin/python3
import json
import subprocess
from contextlib import redirect_stdout
branch_name = subprocess.check_output(['git', 'branch', '--show-current']).decode("utf-8").strip()
with open('doc/generated/' + branch_name + '-Summary-of-Patches.md', 'w') as output_file:
with redirect_stdout(output_file):
with open('common/src/main/resources/assets/modernfix/lang/en_us.json') as lang_json:
lang_obj = json.loads(lang_json.read())
option_names = []
for key, value in lang_obj.items():
if key.startswith("modernfix.option.mixin."):
option_names.append(key.replace("modernfix.option.", ""))
option_names.sort()
print("# Summary of Patches - " + branch_name)
print()
for option in option_names:
option_description = lang_obj.get("modernfix.option." + option)
option_friendly_name = lang_obj.get("modernfix.option.name." + option)
print(f"# `{option}`")
print()
if option_description is not None:
print(option_description)
print("")