This commit is contained in:
Maxim Zaytsev 2021-11-15 21:27:11 +03:00 коммит произвёл GitHub
Родитель 4b85305921
Коммит 5af9e5ce2c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -42,12 +42,14 @@ export async function run() {
// upload a secure file
let s = new stream.Readable();
let testString: string = 'test file contents';
s._read = function noop() {};
s.push("test file contents");
s.push(testString);
s.push(null);
let name = `vstsnodeapitest${new Date().getTime()}`;
console.log("uploading file");
let secureFile = await vstsTask.uploadSecureFile(null, s, project, name);
const headers = { 'Content-Length': testString.length };
let secureFile = await vstsTask.uploadSecureFile(headers, s, project, name);
console.log(`uploaded secure file ${secureFile.name}`);
// delete it

Просмотреть файл

@ -67,6 +67,6 @@ export async function run() {
if (workItemTypes.length > 0) {
const type: WorkItemTrackingInterfaces.WorkItemType = workItemTypes[0];
common.heading('Info for type' + type.name);
console.log(type.name, 'has', (await witApi.getWorkItemTypeColors([project.id])).length, 'colors');
console.log(type.name, 'has', (await witApi.getWorkItemTypeColors([project.name])).length, 'colors');
}
}