Closed albertoleoncio closed 9 months ago
Should be as simple as:
@app.route("/update-server", methods=["POST"]) def webhook(): if request.method == "POST": subprocess.check_output(["git", "pull", "origin", "main"]) return "Updated Toolforge project successfully", 200 else: return "Wrong event type", 400
Source: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Auto-update_a_tool_from_GitHub/GitLab#Python_tool_hosted_in_$HOME/www/python/src
Should be as simple as:
Source: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Auto-update_a_tool_from_GitHub/GitLab#Python_tool_hosted_in_$HOME/www/python/src