(github_user, github_repo, plugin_name)
| 22 | |
| 23 | @app.route("/api/repos/<github_user>/<github_repo>/git/trees/<plugin_name>") |
| 24 | def github_plugin_tree_api(github_user, github_repo, plugin_name): |
| 25 | dir_json = \ |
| 26 | { |
| 27 | "url": f"https://api.github.com/repos/{github_user}/{github_repo}/git/trees/{plugin_name}", |
| 28 | "tree": [] |
| 29 | } |
| 30 | # FIXME: Pull contents from directory |
| 31 | for file in os.listdir(f'tests/data/recklessrepo/{github_user}/{plugin_name}'): |
| 32 | dir_json["tree"].append({"path": file}) |
| 33 | resp = flask.Response(response=json.dumps(dir_json), |
| 34 | headers={'Content-Type': 'application/json; charset=utf-8'}) |
| 35 | return resp |
| 36 | |
| 37 | return app |
| 38 |
nothing calls this directly
no outgoing calls
no test coverage detected