问题
I'm trying to push the files to repository in Azure Repos. I'm using azure-devops-node-api
library to connect and push the file to the repository. I'm beginner in NodeJS. Please find the below code. I'm not sure how to proceed further.
Please help!
const orgUrl = "https://dev.azure.com/orgname";
const azure = require('azure-devops-node-api');
var accessToken = "ACCESS_TOKEN";
var authHandler = azure.getPersonalAccessTokenHandler(accessToken);
var connection = new azure.WebApi(orgUrl, authHandler);
connection.getGitApi().then( gitapi1 => {
// I don't know how to use gitapi1 to commit and push the file
});
来源:https://stackoverflow.com/questions/59171555/how-to-push-the-file-to-tfs-using-azure-devops-node-api-library-in-nodejs