从Azure DevOps导出讨论笔记

时间:2019-08-22 08:48:42

标签: azure-devops

是否可以从诸如任务/错误之类的Azure DevOps工作项中导出讨论笔记。或者在Azure DevOps中是否可以获取讨论的统一Web视图?还是可以建议一些有助于实现这一目标的扩展?

检查了Azure DevOps是否通过无法进行查询的转储

1 个答案:

答案 0 :(得分:0)

使用下面的其余api,您可以从响应正文中获取多个工作项的注释记录。

def generator(X_data, Y_data, batch_size):
samples_per_epoch = X_data.shape[1]#926
number_of_batches = samples_per_epoch/batch_size
counter=0
while 1:
    new_X_batch = []
    X_batch = np.array(X_data[:,batch_size*counter:batch_size*(counter+1)]).astype('float32')
    for i in range(X_batch.shape[0]):
        new_X_batch.append(X_batch[i,])

    del X_batch
    #print(Y_data[batch_size*counter:batch_size*(counter+1)].shape)
    yield new_X_batch  ,np.array(Y_data[batch_size*counter:batch_size*(counter+1)]).astype('float32').reshape((-1,out_len,1))
    #yield new_X_batch  ,np.array(Y_data[batch_size*counter:batch_size*(counter+1)]).astype('float32')
    #del new_X_batch, Y_batch

    counter += 1

    #restart counter to yeild data in the next epoch as well
    if counter >= int(number_of_batches):
        counter = 0

enter image description here

但是此rest api的缺点是它无法显示所有评论记录,而只能显示该工作项的最新评论。

如果要获取工作项的所有注释,则需要使用下面的rest api。但是,此rest api的缺点是它只能返回工作项的所有注释,而不能显示多个工作项的注释记录。

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems?ids={ids}&api-version=5.1

enter image description here