feat: Google Drive 連結檢查器新增社課教材並更名為 gdrive - #204
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
內容
相簿連結檢查器擴充為 Google Drive 連結檢查器,同時檢查社課教材連結,並將相關名稱從
gallery改為gdrive。src/pages/course.js原本寫死的hideURL移到src/data/course/course.json的gdrive_url,頁面改以 GraphQL 讀取;之後每學年更新只需改 JSONscripts/check-gdrive-links.mjs):改為依SOURCES讀取src/data/gallery(相簿)與src/data/course(教材),輸出與 report 帶來源標籤,例如[教材] 社課簡報scripts/notify-gdrive-links.mjs):Discord 訊息改為 Google Drive link checks,受影響清單帶來源標籤test:gdrive-links/notify-gdrive-links、workflowgdrive_check.yml/gdrive_notify.yml、cache key、concurrency group;兩個 workflow 的paths加入src/data/course/**DISCORD_GALLERY_WEBHOOK_URL(避免重新設定)docs/gdrive-link-checker.md(檢查範圍、排程、失效處理、Discord 通知、新增來源、cache 附註),README 只保留簡短說明與連結;修正舊 README 中與 workflow 不符的 cache key 描述;AGENTS.md 同步更新驗證
yarn test:gdrive-links:48 個連結(相簿 47、教材 1)全部 Accessible;--url模式正常gdrive_url型別錯誤皆標為 invalid recordyarn prettier、yarn build通過合併後注意
cache key 改名,新 workflow 第一次執行不會讀到舊狀態;目前連結全數正常,預期不會多發通知。