The service I am building performs scheduled tasks with user and repository PR data.
One such example is creating a mapping from Bitbucket users to Slack users.
I would like to do as much of this one time “up-front” (ideally when granted access via the Auth2 flow) instead of every time the scheduled task runs.
The reason I’ve asked my question the way I have is that my service works with potentially N repos with M Bitbucket users.
Repo A may have PRs with user 1, 2, and 3 assigned as reviewers, and another PR with 1, 2, and 5.
At the same time Repo B may have a PR with users 2, 8, and 12.
I want to map all of these users (employees, contractors, etc. doesn’t matter to me as long as they have access and are active) to Slack users so that I can send them direct messages when certain events occur.
Bitbucket and Slack aren’t the only systems involved but hopefully this explains why I want this data.
Is there perhaps a way to get a bitbucket user by email?
This is one route I could go, though I was hoping to make the account association that I’m building be as automagic as possible, and of course if this functionality exists in the API it could be used for spamming so I assume it doesn’t exist.