Skip to content

Commit d192b15

Browse files
thopx14ThopX
andauthored
[Bitbucket] Adding filterText REST parameter for Get pull requests for (atlassian-api#1542)
repository API call Co-authored-by: ThopX <thopx@protonmail.com>
1 parent 7cbbd62 commit d192b15

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

atlassian/bitbucket/__init__.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,14 +1577,7 @@ def _url_pull_requests(self, project_key, repository_slug):
15771577
return f"{self._url_repo(project_key, repository_slug)}/pull-requests"
15781578

15791579
def get_pull_requests(
1580-
self,
1581-
project_key,
1582-
repository_slug,
1583-
state="OPEN",
1584-
order="newest",
1585-
limit=100,
1586-
start=0,
1587-
at=None,
1580+
self, project_key, repository_slug, state="OPEN", order="newest", limit=100, start=0, at=None, filter_text=None
15881581
):
15891582
"""
15901583
Get pull requests
@@ -1596,6 +1589,8 @@ def get_pull_requests(
15961589
:param limit:
15971590
:param start:
15981591
:param at:
1592+
:param filter_text: (optional) If specified, only pull requests where the title or description
1593+
contains the supplied string will be returned.
15991594
:return:
16001595
"""
16011596
url = self._url_pull_requests(project_key, repository_slug)
@@ -1610,6 +1605,8 @@ def get_pull_requests(
16101605
params["order"] = order
16111606
if at:
16121607
params["at"] = at
1608+
if filter_text:
1609+
params["filterText"] = filter_text
16131610
return self._get_paged(url, params=params)
16141611

16151612
def get_required_reviewers_for_pull_request(

0 commit comments

Comments
 (0)