Hi All,
I'm trying to retrieve all users from Bitbucket with this code:
import com.atlassian.bitbucket.*;
import com.atlassian.bitbucket.user.ApplicationUser;
import com.atlassian.bitbucket.user.UserService;
import com.atlassian.bitbucket.user.Person
import com.atlassian.sal.api.component.ComponentLocator;
import com.atlassian.bitbucket.user.UserAdminService
final UserService userService = ComponentLocator.getComponent(UserService.class);
//File to be written to, can be CSV or TXT
File file = new File("/local/home/rbadmin_app2/output.txt")
ApplicationUser bitbucketUser = userService.getUserByName("");
for(int i = 0; i <= 100; i++){
log.error bitbucketUser
}
this currently returns nothing.
Does anybody know where I'm going wrong?