chore: 更新完成提示 toast 文案(GitMirror 上线)

This commit is contained in:
TermiNexus committed 2026-10-23 15:29:44 +08:00
1 parent d29ed8086f
commit c81637dc71
1 file changed
+2 -2
+2 -2
View File
@@ -3,8 +3,8 @@
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$t = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText02) $t = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText02)
$n = $t.GetElementsByTagName('text') $n = $t.GetElementsByTagName('text')
$n.Item(0).AppendChild($t.CreateTextNode('GitMirror:新 PAT 仍缺写权限与组织 Owner')) | Out-Null $n.Item(0).AppendChild($t.CreateTextNode('GitMirror 已上线:webhook 注册成功,回填进行中')) | Out-Null
$n.Item(1).AppendChild($t.CreateTextNode('实测 push GVSDS/NSQL 被拒(403 Permission denied)说明 Contents 只有读;建仓 403 need admin access 说明令牌未以 GVSDS 组织为资源所有者或属主不是 Owner。请按清单重建 fine-grained PAT:Resource owner 选 GVSDS、Repository access 选 All repositories、Repository permissions 勾 Contents 与 Administration 的 Read and write、Organization permissions 勾 Administration 的 Read and write;若组织启用了 PAT 审批还需批准。代码已提交 SMANAGE eb4ff519,服务与凭据均在本地,未泄漏')) | Out-Null $n.Item(1).AppendChild($t.CreateTextNode('服务监听 3001,公网 http://gitwebhook.gvsds.com:3001/hooks/gitea 已通;Gitea 组织级 webhook 已创建(push/create/delete/repository),签名校验实测 202 通过、401 拒绝。已修复三处:凭据改为 remote 内嵌(原 credential store 被全局 gho_ 令牌抢占)、仅镜像 heads/tags/notes(避免误删 main 与 refs/pull 隐藏 ref)、兼容 Gitea 28 的 events 数组。已同步成功 9 个仓库(含标签),其余回填中,个别因 Gitea 502 会由 15 分钟兜底重试。注意:frpc 已用 WMI 恢复(因计划任务需要管理员权限,未做开机自启);serve 进程仍挂在当前终端,需持久化请用管理员创建计划任务。SMANAGE d29ed808')) | Out-Null
$toast = [Windows.UI.Notifications.ToastNotification]::new($t) $toast = [Windows.UI.Notifications.ToastNotification]::new($t)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier('TraeCode Agent').Show($toast) [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier('TraeCode Agent').Show($toast)
Write-Output 'toast-ok' Write-Output 'toast-ok'