This article explains how to get the status of the Pull Request with a pull request using Bitbucket Command Line Interface (CLI).
Instructions
Use getPullRequest action to get the status of the Pull Requesta pull request. Pull requests are a feature that makes make it easier for developers to collaborate using bitbucketBitbucket.
The parameter parameters used in the below action are:
--project value refers to the project key.
--repository value refers to the repository name.
--pullRequest value refers to the name of the Pull Requestpull request.
Execute this action to get the status of the Pull Requestpull request.
Code Block --action getPullRequest --project "TEST" --repository "repo" --pullRequest "example"
The output of CLI action:
Here, the Status is "NEEDS_WORK"
Code Block Data for pull request: example Project . . . . . . . . . . . : TEST Repository . . . . . . . . . : repo Id . . . . . . . . . . . . . : 18 Version . . . . . . . . . . . : 2 Name . . . . . . . . . . . . : example Description . . . . . . . . . : State . . . . . . . . . . . . : OPEN Created . . . . . . . . . . . : 13/4/20 3:22 PM Updated . . . . . . . . . . . : 13/4/20 4:07 PM From . . . . . . . . . . . . : Id . . . . . . . . . . . . : refs/heads/testam Name . . . . . . . . . . . : testam Latest commit . . . . . . . : 0aaceb5cbfe69e03d00539ce286e50a7423982c0 To . . . . . . . . . . . . . : Id . . . . . . . . . . . . : refs/heads/master Name . . . . . . . . . . . : master Latest commit . . . . . . . : 4e2b94a0d019e21abd21635de7d6d0c1e010a077 Author . . . . . . . . . . . : User . . . . . . . . . . . : User id . . . . . . . . . : automation Display name . . . . . . : Automation Role . . . . . . . . . . . : AUTHOR Reviewers . . . . . . . . . . : Reviewer . . . . . . . . . : User . . . . . . . . . . : User id . . . . . . . . : testam Display name . . . . . : testam Role . . . . . . . . . . : REVIEWER Status . . . . . . . . . : NEEDS_WORK Approved . . . . . . . . : No URL . . . . . . . . . . . . . : http://example.com/projects/TEST/repos/repo/pull-requests/18
...
Info |
---|
It is recommended to test the commands command in a non-production environment before running in the production. |