11 lines
1.5 KiB
PowerShell
11 lines
1.5 KiB
PowerShell
$ErrorActionPreference = 'SilentlyContinue'
|
|
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, 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)
|
|
$n = $t.GetElementsByTagName('text')
|
|
$n.Item(0).AppendChild($t.CreateTextNode('GitMirror 已上线:webhook 注册成功,回填进行中')) | 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)
|
|
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier('TraeCode Agent').Show($toast)
|
|
Write-Output 'toast-ok'
|