Skip to content

Commit f715a0c

Browse files
committed
Merge 1.18 into 1.19.2
2 parents eded461 + f7259f7 commit f715a0c

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/workflows/wiki_update.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: update-wiki
2+
3+
on:
4+
push:
5+
branches:
6+
- '1.**'
7+
8+
jobs:
9+
wikigen:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- run: python3 scripts/gen-markdown-patchlist.py
16+
- name: Upload generated file to wiki
17+
uses: SwiftDocOrg/github-wiki-publish-action@v1
18+
with:
19+
path: "doc/generated"
20+
env:
21+
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.WIKI_TOKEN }}

doc/generated/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

scripts/gen-markdown-patchlist.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/python3
2+
3+
import json
4+
import subprocess
5+
from contextlib import redirect_stdout
6+
7+
branch_name = subprocess.check_output(['git', 'branch', '--show-current']).decode("utf-8").strip()
8+
9+
with open('doc/generated/' + branch_name + '-Summary-of-Patches.md', 'w') as output_file:
10+
with redirect_stdout(output_file):
11+
with open('common/src/main/resources/assets/modernfix/lang/en_us.json') as lang_json:
12+
lang_obj = json.loads(lang_json.read())
13+
option_names = []
14+
for key, value in lang_obj.items():
15+
if key.startswith("modernfix.option.mixin."):
16+
option_names.append(key.replace("modernfix.option.", ""))
17+
option_names.sort()
18+
print("# Summary of Patches - " + branch_name)
19+
print()
20+
for option in option_names:
21+
option_description = lang_obj.get("modernfix.option." + option)
22+
option_friendly_name = lang_obj.get("modernfix.option.name." + option)
23+
print(f"# `{option}`")
24+
print()
25+
if option_description is not None:
26+
print(option_description)
27+
print("")

0 commit comments

Comments
 (0)