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

Change the name in comment posted in pullrequest via rest api

aparna_gogst
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 23, 2023

Hi ,

We have created a bitbucket app. through which we have created a JWT token using installed app response.

and got the access token for the same using this api 
curl --location --request POST 'https://bitbucket.org/site/oauth2/access_token' \
--header 'Authorization: JWT {JWT token } \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=urn:bitbucket:oauth2:jwt'

Now i am using this access token to post a comment on the pull request. The comment is created on the pull request but the posted name is coming as "WORKSPACE NAME for which the app is authenticated. 

Used this api 

curl --location --request POST 'https://api.bitbucket.org/2.0/repositories/ZpcSunSpace/sun/pullrequests/1/comments' \
--header 'Authorization: Bearer {TOKEN}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": {
"raw": "this is summary comment"
}
}'

Screenshot 2023-02-24 at 10.41.52 AM.png

 

Here MilkwaySpace is the workspace name for which the app is authenticated. 
I want my app name instead of workspace name here. How can i get it. 

Thanks in advance

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events