Skip to content

Commit

Permalink
A tools to dump out the possible values for a call to the release API (
Browse files Browse the repository at this point in the history
  • Loading branch information
rfennell authored Mar 19, 2019
1 parent 441e4df commit cca7ceb
Show file tree
Hide file tree
Showing 6 changed files with 3,237 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,5 @@ Extensions/YamlGenerator/YamlGeneratorTask/repo
/.vs
/Extensions/GenerateReleaseNotes/GenerateReleaseNotesTask/ReleaseNotes.md
/Extensions/GenerateReleaseNotes/GenerateReleaseNotesTask/ReleaseNotes_AllFields.md
Tools/GetAPIJsonPayloads/*.js
Tools/GetAPIJsonPayloads/*.js.map
22 changes: 22 additions & 0 deletions Tools/GetAPIJsonPayloads/ExportJson.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as webApi from "vso-node-api/WebApi";
import { IReleaseApi } from "vso-node-api/ReleaseApi";
import * as vstsInterfaces from "vso-node-api/interfaces/common/VsoBaseInterfaces";

async function run(): Promise<void> {
console.log ("Start Export");

var tpcUri = "https://dev.azure.com/richardfennell/";
// assuming I am autneticated I don't need to provide a PAT
var pat = "";
var teamProject = "GitHub";
var releaseId = 1285;
let credHandler = webApi.getHandlerFromToken(pat);
let vsts = new webApi.WebApi(tpcUri, credHandler);
var releaseApi: IReleaseApi = await vsts.getReleaseApi();
var release = await releaseApi.getRelease(teamProject, releaseId);
console.log (release);

console.log ("End Export");
}

run();
Loading

0 comments on commit cca7ceb

Please sign in to comment.