bitbucket-pullrequest-builder-plugin icon indicating copy to clipboard operation
bitbucket-pullrequest-builder-plugin copied to clipboard

env.pullRequestAuthor returns <@null> for email address

Open RayOei opened this issue 6 years ago • 3 comments

The pullRequestAuthor environment variable return the name, but not the email. So echo "$env.pullRequestAuthor" returns: Ray Oei <@null> while I would expect: Ray Oei <[email protected]>

RayOei avatar Feb 16 '20 10:02 RayOei

Thank you! I'll look into that ASAP.

CodeMonk avatar Feb 19 '20 17:02 CodeMonk

Any update on this? Can I do something to help to solve it?

dima1308 avatar Apr 07 '20 15:04 dima1308

The Bitbucket API endpoint: https://bitbucket.org/api/2.0/repositories/ACCOUNT/REPO/pullrequests/

Does NOT return email addresses for users. All you get is this for the author:

"author": {
                "account_id": "HEX_MESS",
                "display_name": "FIRST_NAME LAST_NAME",
                "links": {
                    "avatar": {
                        "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/STUFF/UID"
                    },
                    "html": {
                        "href": "https://bitbucket.org/UID_STUFF/"
                    },
                    "self": {
                        "href": "https://bitbucket.org/!api/2.0/users/UID_STUFF"
                    }
                },
                "nickname": "FIRST_NAME LAST_NAME",
                "type": "user",
                "uuid": "{UID}"
            },

CodeMonk avatar Apr 07 '20 18:04 CodeMonk