Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Change the name in comment posted in pullrequest via rest api

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
Site Admin
TAGS
AUG Leaders

Atlassian Community Events