@@ -1081,24 +1081,43 @@ def get_diff(self, project, repository, path, hash_oldest, hash_newest):
10811081 params ['to' ] = hash_newest
10821082 return (self .get (url , params = params ) or {}).get ('diffs' )
10831083
1084- def get_commits (self , project , repository , hash_oldest , hash_newest , limit = 99999 ):
1084+ def get_commits (self , project , repository , hash_oldest = None , hash_newest = None , follow_renames = False ,
1085+ ignore_missing = False , merges = "include" , with_counts = False ,
1086+ avatar_size = None , avatar_scheme = None , limit = 99999 ):
10851087 """
10861088 Get commit list from repo
10871089 :param project:
10881090 :param repository:
10891091 :param hash_oldest:
10901092 :param hash_newest:
1093+ :param merges: OPTIONAL: include|exclude|only if present, controls how merge commits should be filtered.
1094+ :param follow_renames: OPTIONAL: if true, the commit history of the specified file will be followed past renames.
1095+ :param ignore_missing: OPTIONAL: true to ignore missing commits, false otherwise
1096+ :param with_counts: OPTIONAL: optionally include the total number of commits and total number of unique authors
1097+ :param avatar_size: OPTIONAL: if present the service adds avatar URLs for commit authors.
1098+ :param avatar_scheme: OPTIONAL: the desired scheme for the avatar URL
10911099 :param limit: OPTIONAL: The limit of the number of commits to return, this may be restricted by
10921100 fixed system limits. Default by built-in method: 99999
10931101 :return:
10941102 """
10951103 url = 'rest/api/1.0/projects/{project}/repos/{repository}/commits' .format (project = project ,
10961104 repository = repository )
10971105 params = {}
1106+ params ["merges" ] = merges
10981107 if hash_oldest :
10991108 params ['since' ] = hash_oldest
11001109 if hash_newest :
11011110 params ['until' ] = hash_newest
1111+ if follow_renames :
1112+ params ['followRenames' ] = follow_renames
1113+ if ignore_missing :
1114+ params ['ignoreMissing' ] = ignore_missing
1115+ if with_counts :
1116+ params ['withCounts' ] = with_counts
1117+ if avatar_size :
1118+ params ['avatarSize' ] = avatar_size
1119+ if avatar_scheme :
1120+ params ['avatarScheme' ] = avatar_scheme
11021121 if limit :
11031122 params ['limit' ] = limit
11041123 return (self .get (url , params = params ) or {}).get ('values' )
0 commit comments