script: Change category slug for better Admin panel management
What changed, and why it matters
This commit updates a GitHub automation script that synchronizes documentation pages with the ReadMe documentation platform. It changes the documentation category slug from 'JSON-RPC API Reference' to 'JSON-RPC' and removes URL-encoding of that slug. It also adds an error message when the ReadMe API request fails. There is no security-relevant change here.
No security action needed. Treat as a routine documentation workflow maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies .github/scripts/sync-rpc-cmds.py, a CI/maintenance script for syncing RPC command documentation to ReadMe. It removes the urllib.parse.quote import, changes CATEGORY_SLUG to a simpler value, and stops URL-encoding the slug in the API request path. It adds basic console error logging on non-200 responses. These are operational/documentation workflow changes with no effect on the lightning node, wallet, protocol, or secrets handling.
Changed components
.github/scripts/sync-rpc-cmds.pyInspect captured patch +4 / −3
diff --git a/.github/scripts/sync-rpc-cmds.py b/.github/scripts/sync-rpc-cmds.py
index f1bf8de1..a9c3ef31 100644
--- a/.github/scripts/sync-rpc-cmds.py
+++ b/.github/scripts/sync-rpc-cmds.py
@@ -1,5 +1,4 @@
import os
-from urllib.parse import quote
from time import sleep
import requests
import re
@@ -7,7 +6,7 @@ from enum import Enum
# readme url
URL = "https://api.readme.com/v2/branches/stable"
-CATEGORY_SLUG = "JSON-RPC API Reference"
+CATEGORY_SLUG = "JSON-RPC"
class Action(Enum):
@@ -17,10 +16,12 @@ class Action(Enum):
def getListOfRPCDocs(headers):
- response = requests.get(f"{URL}/categories/reference/{quote(CATEGORY_SLUG)}/pages", headers=headers)
+ response = requests.get(f"{URL}/categories/reference/{CATEGORY_SLUG}/pages", headers=headers)
if response.status_code == 200:
return response.json().get('data', [])
else:
+ print(f"❌ Failed to get pages: {response.status_code}")
+ print(response.text)
return []
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.