@@ -27,6 +27,34 @@ while IFS= read -r line; do
2727 fi
2828done < <( git submodule status)
2929
30+ # Check open PRs for Python plugins being ported to Lua
31+ declare -A IN_PROGRESS_PLUGINS
32+
33+ if command -v curl & > /dev/null; then
34+ pr_data=$( curl -sf " https://api.github.com/repos/SteamClientHomebrew/PluginDatabase/pulls?state=open&per_page=100" 2> /dev/null)
35+
36+ if [[ -n " $pr_data " ]]; then
37+ # Only consider PRs with [lua-port] in the title
38+ lua_port_prs=$( echo " $pr_data " | jq -r ' .[] | select(.title | ascii_downcase | contains("[lua-port]")) | .number' 2> /dev/null)
39+
40+ for pr_number in $lua_port_prs ; do
41+ files_data=$( curl -sf " https://api.github.com/repos/SteamClientHomebrew/PluginDatabase/pulls/${pr_number} /files" 2> /dev/null)
42+
43+ if [[ -n " $files_data " ]]; then
44+ changed_plugins=$( echo " $files_data " | jq -r ' .[].filename' 2> /dev/null | grep ' ^plugins/' | sed ' s|^plugins/||' | cut -d' /' -f1 | sort -u)
45+
46+ for changed_plugin in $changed_plugins ; do
47+ for py_plugin in " ${PYTHON_PLUGINS[@]} " ; do
48+ if [[ " $changed_plugin " == " $py_plugin " ]]; then
49+ IN_PROGRESS_PLUGINS[" $py_plugin " ]=1
50+ fi
51+ done
52+ done
53+ fi
54+ done
55+ fi
56+ fi
57+
3058TOTAL_PLUGINS=$(( ${# LUA_PLUGINS[@]} + ${# PYTHON_PLUGINS[@]} ))
3159
3260echo " ## Repository Manifest"
@@ -63,6 +91,9 @@ for (( i=0; i<max_rows; i++ )); do
6391 if (( i < ${# PYTHON_PLUGINS[@]} )) ; then
6492 py_num=" $(( i + 1 )) "
6593 py_name=" ${PYTHON_PLUGINS[$i]} "
94+ if [[ -n " ${IN_PROGRESS_PLUGINS[$py_name]+x} " ]]; then
95+ py_name=" $py_name (in-progress)"
96+ fi
6697 else
6798 py_num=" "
6899 py_name=" "
0 commit comments