|
26 | 26 | from github3.repos.commit import RepoCommit
|
27 | 27 | from github3.repos.comparison import Comparison
|
28 | 28 | from github3.repos.contents import Contents, validate_commmitter
|
| 29 | +from github3.repos.deployment import Deployment |
29 | 30 | from github3.repos.hook import Hook
|
30 | 31 | from github3.repos.status import Status
|
31 | 32 | from github3.repos.stats import ContributorStats
|
@@ -1185,6 +1186,19 @@ def iter_contributor_statistics(self, number=-1, etag=None):
|
1185 | 1186 | url = self._build_url('stats', 'contributors', base_url=self._api)
|
1186 | 1187 | return self._iter(int(number), url, ContributorStats, etag=etag)
|
1187 | 1188 |
|
| 1189 | + def iter_deployments(self, number=-1, etag=None): |
| 1190 | + """Iterate over deployments for this repository. |
| 1191 | +
|
| 1192 | + :param int number: (optional), number of deployments to return. |
| 1193 | + Default: -1, returns all available deployments |
| 1194 | + :param str etag: (optional), ETag from a previous request for all |
| 1195 | + deployments |
| 1196 | + :returns: generator of |
| 1197 | + :class:`Deployment <github3.repos.deployment.Deployment>`\ s |
| 1198 | + """ |
| 1199 | + url = self._build_url('deployments', base_url=self._api) |
| 1200 | + return self._iter(int(number), url, Deployment, etag=etag) |
| 1201 | + |
1188 | 1202 | def iter_events(self, number=-1, etag=None):
|
1189 | 1203 | """Iterate over events on this repository.
|
1190 | 1204 |
|
|
0 commit comments