Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding reviewers to PR w/o username REST API

ben-dean-ontsys June 13, 2019

I was wondering how I can add reviewers to a pullrequest without knowing there UUID? It doesn't look like there's a reasonable way to get the UUID with the API.

I tried using this for the post body:

{
"title": "testing",
"description": "This will **fail**.",
"source": { "branch": { "name": "foo" } },
"close_source_branch": true,
"reviewers":[
{ "nickname": "jane-doe" }
]
}

And failed with:

{
"type": "error",
"error": {
"fields": {
"reviewers": [
"Malformed reviewers list"
]
},
"message": "reviewers: Malformed reviewers list"
}
}

So what's the solution? username will still work (for now), but it seems like that's going away. These are teammates at my workplace I'm adding, not strangers. I know their usernames by a convention we use, but even in the UI I have to just start typing their display name. Maybe the answer is just don't ever expect to do anything with users, I don't know. :\

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events