py-gitea icon indicating copy to clipboard operation
py-gitea copied to clipboard

Added dict parameter to repo.get_commits() to define what shall be pulled; added two new properties to Commit

Open wullxz opened this issue 3 years ago • 2 comments

In a large repository, get_commits() will run into too many recursions. I added the possibility to define sha, page, limit (all from the API documentation) and the additional non-API parameter pages, which defines how many pages of commits shall be requested. The default for pages is -1, which will request pages indefinitely.

I also added the commit message property the the Commit class/object. I also added the commit_date property that is read from the commiter structure below the commit structure because that date represents the actual commit time. In our case, the Commit.created property contains bogus values because we're importing from SVN.

wullxz avatar Dec 11 '21 02:12 wullxz

Thanks, although we had some unfortunate timing: I refactored some of the code you worked in during the last weeks, especially removing the redundant page-iteration code for requests. It would be nice if you could adapt your canges.

Langenfeld avatar Dec 13 '21 10:12 Langenfeld

Well, those are some big changes. I'll need to see where the changes affect my code and that'll take some time. I'll try to do it in the next couple of days.

wullxz avatar Dec 13 '21 13:12 wullxz