本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用持續現代化
來源管理
使用 atx ct source 命令來連接儲存庫。支援的提供者:GitHub、GitLab、Bitbucket、local。
GitHub 組織
權杖:具有repo範圍的個人存取權杖 (傳統)。用於分析的唯讀、用於修復的完整儲存庫。
atx ct source add --namename--provider github --orgorg--tokenpat
GitLab 群組和使用者
權杖:具有api範圍的個人存取權杖。
atx ct source add --namename--provider gitlab --orggroup-or-user--tokenpat# Self-hosted: atx ct source add --namename--provider gitlab --orggroup-or-user--tokenpat--url https://gitlab.example.com
Bitbucket 工作空間和專案
Bitbucket Cloud — 範圍:read:repository:bitbucket、write:repository:bitbucket、read:pullrequest:bitbucket、write:pullrequest:bitbucket。也需要 --email和 --username。
atx ct source add --namename--provider bitbucket --orgworkspace--tokenapi-token--emailusername
Bitbucket 資料中心:
atx ct source add --namename--provider bitbucket --orgproject-key--tokenhttp-access-token--url https://bitbucket.example.com
本機儲存庫
atx ct source add --namename--provider local --pathparent-directory
重要
--path 必須指向包含 git 儲存庫的父目錄作為子目錄,而不是單一儲存庫。
管理來源
atx ct source list atx ct source remove --namename
儲存庫探索和管理
atx ct discovery scan --sourcenameatx ct discovery status --sourcenameatx ct discovery scan --sourcename--pathnew-directory
探索後:
atx ct repository list atx ct repository list --sourcenameatx ct repository list --labels "team:frontend,priority:high" atx ct repository update --sourcename--repo "source::slug" --labels "team:frontend,priority:high" atx ct repository update --sourcename--labels "migration:wave-1"
執行分析
--type 旗標指定要執行的分析類型:
rapid-techdebt-analysis– 過時的相依性和輕鬆獲勝。tech-debt-comprehensive– 更深入的 AI 驅動分析,涵蓋相依性、安全性、模式、效能、可維護性、架構、程式碼品質和基礎設施問題清單。security– 安全漏洞和暴露。agentic-readiness– AI 代理器儲存庫的準備程度 (架構、APIs、文件)。modernization-readiness– 跨基礎設施、應用程式、資料、安全性和操作維度的現代化機會。
atx ct analysis run --typetype--sourcename[--reposource::slug] [--wait] atx ct analysis get --idid--json atx ct analysis list --json atx ct analysis list --statuspending|running|complete|cancelled|failed--json atx ct analysis list --typetype--json atx ct analysis cancel --ididatx ct analysis delete --idid[--cascade-findings]
自訂分析
atx ct analysis run --type custom --transformation-namename--sourcesource--reposource::slug--wait
具有-g旗標的組態:金鑰值、JSON 或檔案路徑。
列出 TDs: atx custom def list
管理調查結果
atx ct findings list --json atx ct findings list --reposource::slug--sourcename--severityhigh|medium|low--typeanalysis-type--statusopen|dismissed|obsolete--analysis-idid--fix-transformtransform-name--json
尋找狀態
open— 作用中dismissed— 手動關閉 (需要原因)obsolete— 重新分析不再產生問題清單時的系統集
atx ct findings update --idid--status dismissed --reason "reason" atx ct findings update --idid--status open atx ct findings batch-update --idsid1,id2--status dismissed --reason "reason" atx ct findings get --ididatx ct findings delete --idid
尋找淘汰
重新分析會將已解決的問題清單標記為已淘汰。無法重新開啟。保留以供稽核。
建立修復
三種模式:以問題清單為基礎、TD 覆寫、直接 TD。
atx ct remediation create --idsid1,id2--name "name" atx ct remediation create --idsid1,id2--transformation-nameTDatx ct remediation create --transformation-nameTD--reposource::slug
提供者輸出:GitHub PR、GitLab MR、Bitbucket PR、Local 分支。
注意
權杖必須具有寫入存取權才能建立 PR/MR。
具有 --local 旗標的本機執行。
atx ct remediation create --transformation-nameTD--reposource::slug-g "additionalPlanContext=Upgrade to Node.js 22" atx ct remediation list atx ct remediation status --ididatx ct remediation retry --ididatx ct remediation delete --idid
AWS 轉換 Web 應用程式 (選用)
AWS 轉換 Web 應用程式是選擇性的界面,用於監控整個程式碼來源產品組合的持續現代化分析、調查結果和修復。
在使用 AWS 轉換 Web 應用程式之前,您需要啟用使用者身分,才能存取組織中的 AWS 轉換。如需啟用 AWS 轉換的相關資訊,請參閱設定 AWS 轉換。
若要使用 AWS 轉換 Web 應用程式:
請造訪
https://aws.amazon.com/transform/並使用 AWS IAM Identity Center 登入資料登入。如果持續現代化在您登入後未出現,請改用 IAM 登入資料登入。若要啟用 IAM 登入資料登入:
在 AWS 管理主控台中,開啟 AWS 轉換,然後選擇設定。
在使用 IAM 登入資料進行存取 AWS 轉換區段中,啟用 IAM 登入資料存取。
在相同的設定頁面上,複製 Web 應用程式 URL (使用 IAM) 下顯示的登入連結。
將登入 URL 貼到開啟 管理主控台的 AWS 同一個瀏覽器視窗。這可確保 Web 應用程式使用該帳戶的 AWS 登入資料。
開啟左側導覽選單,然後選擇持續現代化。儀表板會顯示摘要統計資料,包括來源、儲存庫、依嚴重性區分的問題清單總數和分析類型。
使用分析、調查結果和修復索引標籤來檢視詳細結果。
直接從 Web 應用程式與 AWS Transform 聊天,詢問有關分析、問題清單或修復的問題。
Web 應用程式專為企業規模操作而設計,您需要集中掌握多個程式碼庫的持續現代化分析和修復。