From 9b40bb18f066c2a18cbcf79e065971efa6c58eee Mon Sep 17 00:00:00 2001 From: Eugene Alfonso Date: Wed, 25 Sep 2024 12:31:38 -0400 Subject: [PATCH] Adding path param to repository.get_commits() (#1457) --- atlassian/bitbucket/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atlassian/bitbucket/__init__.py b/atlassian/bitbucket/__init__.py index e2ae5fd61..9137b1e21 100644 --- a/atlassian/bitbucket/__init__.py +++ b/atlassian/bitbucket/__init__.py @@ -2330,6 +2330,7 @@ def get_commits( limit=None, until=None, since=None, + path=None, ): """ Get commit list from repo @@ -2347,6 +2348,7 @@ def get_commits( fixed system limits. Default by built-in method: None :param until: OPTIONAL: The commit ID or ref (inclusively) to retrieve commits before :param since: OPTIONAL: The commit ID or ref (exclusively) to retrieve commits after + :param path: OPTIONAL: An optional path to filter commits by :return: """ url = self._url_commits(project_key, repository_slug) @@ -2373,6 +2375,8 @@ def get_commits( params["since"] = since if until: params["until"] = until + if path: + params["path"] = path return self._get_paged(url, params=params) def get_commit_changes(self, project_key, repository_slug, hash_newest=None, merges="include", commit_id=None):