feat: Issue 模板引导链接改指课程官网, 平台地址改由 public_url 注入

- 两个 config.yaml 的 contact_links 从 example.com 换成真实入口:
  官网《学会提问》/ 课程官网 / 平台提问速查, 让答疑平台与官网互相导流
- 模板支持 {{BASE_URL}}/{{ORG}}/{{REPO}} 占位符, 推送时替换,
  换学期建新组织不用改模板; 未配置时保留占位符并告警而不是推坏链接
- scripts: 新增 gitea.public_url(对外地址, 与 CLI 用的 url 区分),
  utils.web_base_url()/render_template_placeholders() 及单元测试
This commit is contained in:
2026-09-11 17:07:11 +08:00
parent 44b174d319
commit 68fb567cb3
9 changed files with 139 additions and 18 deletions
+4
View File
@@ -55,6 +55,10 @@ class GiteaConfig(BaseModel):
token: SecretStr
email_domain: str = "tongji.edu.cn"
default_org: str = ""
# 面向用户的访问地址(Apache 反代后的地址, 如 https://cpp.tongji.sh/QA)。
# url 是 CLI 调 API 用的地址, 可能带内部端口, 不能直接写进 Issue Template 等
# 给同学看的链接里; 留空时回退到 url。
public_url: str = ""
labels: list[LabelDef] = []