microsoft / microsoft/azure-devops-python-api
Can get a task definition by id.
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 684
- 分支
- 218
- 平均合併
- 8 天 10 小時
- 30 天內合併 PR
- 1
描述
Having a task definition reference by id it's not possibled to have it retrieved.
I'm reffering to TaskDefinitionReference which is present both in task_agent_client.pyand build_client.py.
For example getting a pipeline definition and having mutiple build steps like
{
'environment': {},
'enabled': True,
'continueOnError': False,
'alwaysRun': True,
'displayName': 'Publish Artifact',
'timeoutInMinutes': 0,
'condition': 'succeededOrFailed()',
'task': {
**'id': '2ff763a7-ce83-4e1f-bc89-0ae63477cebe',**
'versionSpec': '1.*',
'definitionType': 'task'
},
'inputs': {
'PathtoPublish': '$(build.artifactstagingdirectory)',
'ArtifactName': 'drop',
'ArtifactType': 'Container',
'TargetPath': '\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)',
'Parallel': 'false',
'ParallelCount': '8',
'FileCopyOptions': ''
}
}
I would like to be able to retrieve all task step related by using the task -> id
Something like task_agent_client.get_task_by_id(task_id= '2ff763a7-ce83-4e1f-bc89-0ae63477cebe') and will return an object of type
class:TaskDefinitionReference <azure.devops.v5_1.task_agent.models.TaskDefinition>
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先閱讀 task_agent_client.py 和 build_client.py 中的 TaskDefinitionReference,然後追蹤如何取得 pipeline 任務參照。新增所要求的 task_agent_client.get_task_by_id 入口點,讓任務 ID 傳回一個 TaskDefinition 物件,並根據範例任務參照驗證傳回的資料。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- azure, python
- 領域
- api, devops
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100