Open niharmkn opened 9 months ago
@gonchik or team can you please look at this as it is the blocker for me?
repository.commits.get("7d947c8a7c70bc72d8e77f0d1010a380ccf7c03f")
is what you are looking for.
Ultimately my end goal is to get the list of commits between given datetime time-range.
But this is something complete different from filtering by a commit hash.
You need something like:
for commit in repository.commits.each(q='created_on > 2015-10-04T14:00:00-07:00'):
print(f'Commit: \n {commit.data["hash"]}\n')
Ultimately my end goal is to get the list of commits between given datetime time-range.
But this is something complete different from filtering by a commit hash.
You need something like:
for commit in repository.commits.each(q='created_on > 2015-10-04T14:00:00-07:00'): print(f'Commit: \n {commit.data["hash"]}\n')
@Spacetown , Thanks for the prompt reply,
Yes you are right, I have just provided the example to point out that querying is not working for the hash, date etc..
And in commits I don't think there is any created_on field.
repository.commits.get("7d947c8a7c70bc72d8e77f0d1010a380ccf7c03f ")
is what you are looking for.
No, that is just for the reference that querying is not working, I want to filter out commits based on given date range
@niharmkn You're right, it's date
. The argument is given to the paged API as it's documented by Atlassian.
@niharmkn You're right, it's
date
. The argument is given to the paged API as it's documented by Atlassian.
@Spacetown may I know how can I achieve the commit filtaration based on date field? As I had tried by querying on date field but not able to fetch the filtered data.
I don't think you can filter by date
using bitbucket api[1]. So you will have to do this from your application.
@djgoku library supports for the querying and seems that functionality of querying for each
function in commits was not working for any of the commit field. Is there any workaround or fix you can apply for that? As the manual filtration was not a good approach at all
@djgoku library supports for the querying and seems that functionality of querying for
each
function in commits was not working for any of the commit field. Is there any workaround or fix you can apply for that? As the manual filtration was not a good approach at all
The only filtering that can be done is using include
, exclude
and path
which I don't think we support currently [1]. It looks like if you want to filter by author, date or something else you will have to do this in your client application.
@djgoku library supports for the querying and seems that functionality of querying for
each
function in commits was not working for any of the commit field. Is there any workaround or fix you can apply for that? As the manual filtration was not a good approach at all
We forward the query only to the API. If the API doesn't support it we can't do anything. @gonchik Maybe the q
parameter should be removed or a warning should be logged.
Hi,
I'm trying to use the
q
parameter to filter the list of commits thatcommits.each()
generates but that doesn't seem to work:commits = repository.commits.each(q="hash=\"7d947c8a7c70bc72d8e77f0d1010a380ccf7c03f\"")
for commit in commits:
print(f'Commit: \n {commit.data["hash"]}\n')
it gives me all of the commits hash in my repository. Did someone experience something similar? On the Atlassian docs, it is not clarified if the pipelines endpoint supports query filtering or not.
Ultimately my end goal is to get the list of commits between given datetime time-range.