Accept engine sources from Gitea servers
Tests, tunes and datagen could only use https://github.com/<user>/<repo>. Gitea servers listed under "gitea_hosts" in Config/config.json are now accepted too, starting with https://gitea.rektdie.com. - OpenBench/git_hosts.py holds all host logic: repo validation, API base, resolving a branch/tag/sha, compare counts, diff links and source URLs. - The server talks to Gitea with the token in Config/credentials.gitea and sends it nowhere else; Github requests stay unchanged. - Gitea may require a login even to read, so workers cannot download the archive themselves. The server gives them a /giteaSource/ link signed with an HMAC of repo and commit (SECRET_KEY), and streams the archive from the Gitea API. No client change, no client version bump. - Diff links, the out-of-date check and the profile page handle Gitea repos; the repo fields of the forms accept every configured prefix. - Private engines stay Github-only, they depend on Github Actions artifacts. - Static version bumped to v5 for the changed default_text.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d77f096932
commit
c721cc6b5b
11 files changed
+283
-50
No files matched your search
@@ -15,8 +15,8 @@
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded', function () {
|
||||
change_engine('{{ profile.engine }}', 'dev', '{{workload}}');
|
||||
enforce_default_text('dev_repo', 'https://github.com/');
|
||||
enforce_default_text('base_repo', 'https://github.com/');
|
||||
enforce_default_text('dev_repo', ['https://github.com/'{% for host in config.gitea_hosts %}, '{{host}}/'{% endfor %}]);
|
||||
enforce_default_text('base_repo', ['https://github.com/'{% for host in config.gitea_hosts %}, '{{host}}/'{% endfor %}]);
|
||||
}, false
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<script src="{% static 'default_text.js' %}?{{ static_version }}"></script>
|
||||
|
||||
<script>
|
||||
enforce_default_text('new-engine-repo', 'https://github.com/');
|
||||
enforce_default_text('new-engine-repo', ['https://github.com/'{% for host in config.gitea_hosts %}, '{{host}}/'{% endfor %}]);
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in new issue
Block a user