atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 645 forks source link

[Bitbucket] refs are missing for Cloud Bitbucket #1077

Open yzislin opened 1 year ago

yzislin commented 1 year ago

Hello,

You have defined refs endpoint for repo but it is not available for repo object and hence cannot be retrieved.

Thanks.

Spacetown commented 1 year ago

Can you give more details? Which function is specified and which is missing with links to the files?

yzislin commented 1 year ago

Sure.

`bitbucket = Cloud(username="myusername", password="somepass", cloud=True)

repo = bitbucket.workspaces.get("workspace1").repositories.get("repo1") for ref in repo.refs.each(): print (ref) ` I would get an error that repo does not have refs method/property defined.

Spacetown commented 1 year ago

You have defined refs endpoint for repo And which function is meant here?

yzislin commented 1 year ago

What do you mean defined? For example, commits are not defined, they are just there. I saw in your repository refs.py inside repositories folder (along with commits.py and others). So I assumed, it was supported as a property under repository object.

On a separate note, what is the process of contributing? I have created quick and dirty fix for handling rate limiting issues. It seems to work just fine.

Also, for some reason repo.commits.each(sort="date") is not working. It keeps sorting in descending order. I need ascending. Changing to -date doesnt help.

Should I be asking these questions somewhere else?

Thanks.

yzislin commented 1 year ago

I think I have figured out refs issue. It is actually called tags. Right?

Spacetown commented 1 year ago

There are two ref properties tags and branches. For sorting you can try created_on.