File name
Commit message
Commit date
# Archive the two smoke-test channels (999_스모크테스트기관) on Mattermost.
# DELETE on /api/v4/channels/{id} archives the channel (recoverable by admin), it does NOT hard-delete.
# Token is read from the xlsm at runtime; nothing secret is stored in this file. Gitignored.
$ErrorActionPreference = 'Stop'
$env:PYTHONIOENCODING = 'utf-8'
$xlsm = 'D:\아이티앤\신유형사업\★ 2026 신유형 사업 신청기관 리스트_47개_260719.xlsm'
$token = & python -c @"
import sys, openpyxl
wb = openpyxl.load_workbook(sys.argv[1], data_only=True, read_only=True)
print(wb['Mattermost_설정']['B3'].value.strip())
"@ $xlsm
if (-not $token) { throw 'failed to read token from xlsm' }
$headers = @{ Authorization = "Bearer $token" }
$ids = @('yyxiqfwzujbrmxxji15d67wk9y', 'dwymb6s9pfdhumf1u1cs65dkxr') # mj, law of org 999
foreach ($id in $ids) {
$r = Invoke-RestMethod -Method Delete -Uri "https://hub.iten.co.kr/api/v4/channels/$id" -Headers $headers
Write-Host "archived: $id"
}
Write-Host 'done - both smoke channels archived.'