Skip to content

bitbucket get-issue

Get bitbucket issue

Description

Get bitbucket issue

Synopsis

bitbucket get-issue
    [--site <site>]
    --repo <repo>
    --issue <issue>

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

repo - (string)

     Fully Qualified Repository Name for issue
     Example: --repo "bitbucket_user1/test_repo_1"
     Default: _None_      Attributes: required

issue - (int)

     issue id
     Example: --issue 1
     Default: _None_      Attributes: required

Examples

Input:

x = !bitbucket get-issue --repo "sbansal7/repo1" --issue 1
Output:
{
    "type": "issue",
    "id": 1,
    "repository": {
        "type": "repository",
        "full_name": "sbansal7/repo1",
        "links": {
            "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/sbansal7/repo1"
            },
            "html": {
                "href": "https://bitbucket.org/sbansal7/repo1"
            },
            "avatar": {
                "href": "https://bytebucket.org/ravatar/%7Bc7b44412-1430-4789-a512-4c8cadf3f6f7%7D?ts=default"
            }
        },
        "name": "repo1",
        "uuid": "{c7b44412-1430-4789-a512-4c8cadf3f6f7}"
    },
    "links": {
        "self": {
            "href": "https://api.bitbucket.org/2.0/repositories/sbansal7/repo1/issues/1"
        },
        "html": {
            "href": "https://bitbucket.org/sbansal7/repo1/issues/1/test-issue"
        },
        "comments": {
            "href": "https://api.bitbucket.org/2.0/repositories/sbansal7/repo1/issues/1/comments"
        },
        "attachments": {
            "href": "https://api.bitbucket.org/2.0/repositories/sbansal7/repo1/issues/1/attachments"
        },
        "watch": {
            "href": "https://api.bitbucket.org/2.0/repositories/sbansal7/repo1/issues/1/watch"
        },
        "vote": {
            "href": "https://api.bitbucket.org/2.0/repositories/sbansal7/repo1/issues/1/vote"
        }
    },
    "title": "test issue",
    "content": {
        "type": "rendered",
        "raw": "```\r test description\r ```\r \r ",
        "markup": "markdown",
        "html": "<div class=\"codehilite\"><pre><span></span><span>test description</span> </pre></div> <p></p>"
    },
    "reporter": {
        "display_name": "Sachin Bansal",
        "links": {
            "self": {
                "href": "https://api.bitbucket.org/2.0/users/%7Bfa271433-988c-4a42-932b-380426e46f8e%7D"
            },
            "avatar": {
                "href": "https://secure.gravatar.com/avatar/bbcb732b26ae24604238af9c110f5f76?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSB-2.png"
            },
            "html": {
                "href": "https://bitbucket.org/%7Bfa271433-988c-4a42-932b-380426e46f8e%7D/"
            }
        },
        "type": "user",
        "uuid": "{fa271433-988c-4a42-932b-380426e46f8e}",
        "account_id": "630d04a0316bbc56c42401e9",
        "nickname": "Sachin Bansal"
    },
    "assignee": {
        "display_name": "Sachin Bansal",
        "links": {
            "self": {
                "href": "https://api.bitbucket.org/2.0/users/%7Bfa271433-988c-4a42-932b-380426e46f8e%7D"
            },
            "avatar": {
                "href": "https://secure.gravatar.com/avatar/bbcb732b26ae24604238af9c110f5f76?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSB-2.png"
            },
            "html": {
                "href": "https://bitbucket.org/%7Bfa271433-988c-4a42-932b-380426e46f8e%7D/"
            }
        },
        "type": "user",
        "uuid": "{fa271433-988c-4a42-932b-380426e46f8e}",
        "account_id": "630d04a0316bbc56c42401e9",
        "nickname": "Sachin Bansal"
    },
    "created_on": "2022-08-29T20:55:42.002231+00:00",
    "edited_on": null,
    "updated_on": "2022-08-30T01:28:22.947435+00:00",
    "state": "new",
    "kind": "bug",
    "milestone": null,
    "component": null,
    "priority": "major",
    "version": null,
    "votes": 0,
    "watches": 0
}
Input:
!bitbucket get-issue --repo "sbansal7/repo1" --issue 1
Output:
ID  TYPE    PRIORITY    STATE   ASSIGNEE        MILESTONE   TITLE
 1  bug     major       new     Sachin Bansal   null        test issue

Access Control

To use this command, you need access to the following:

Field Value
Action "read"
Service Type "bitbucket"
Service Instance
Namespace repo
Object Type "issue"
Object ID

Please see Access Control for details.