I use bitbucket and use below code for create my repository, but body.details returns '{ build_tags: [ 'This field is required.' ] }'
let dockerHubAPI = require('docker-hub-api');
dockerHubAPI.login(process.env.USER_NAME, process.env.USER_PASSWD).then(function(info) {
console.log(info); //Logins OK
});
//After Log in
var details={ 'build_tags': [ { 'name': 'latest', 'source_type': 'Branch', 'source_name': 'master', 'dockerfile_location': '/' } ], 'description': 'test', 'is_private': false, 'provider': 'bitbucket', 'vcs_repo_name': 'username/repository' }; //For create basic build option
dockerHubAPI.createAutomatedBuild('myaccount', 'test', details).then(function(resolve,reject) {
console.log(reject);
console.log(resolve);
}).catch((error) => {
console.log(error);
error;
});
I was give build_tags and according to manual, it can void (then set default).