Attach File to Work Item
az_workitem_attachUpload local files as attachments to Azure DevOps work items and create links. Supports text and binary files up to 100MB, with optional comment and custom display name.
Instructions
將本機檔案上傳為 Azure DevOps work item 附件並建立連結(純文字與 binary 檔皆可,上限 100MB)。預設 organization 為 https://dev.azure.com/SKMHHIS、project 為 MS。認證優先使用 AZURE_DEVOPS_EXT_PAT 環境變數,否則使用 az login 的憑證。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | No | 附件備註,顯示在 work item 附件上 | |
| fileName | No | 覆寫附件顯示名稱,預設取 filePath 的檔名 | |
| filePath | Yes | 本機檔案的絕對路徑 | |
| workItemId | Yes | 目標 work item ID |