def commits(self, branch, since=<NUM_LIT:0>, to=int(time.time()) + <NUM_LIT>):
if self.github.get_rate_limit().rate.limit == <NUM_LIT:0>:<EOL><INDENT>raise GithubException<EOL><DEDENT>commits = {}<EOL>since_dt = datetime.datetime.fromtimestamp(since)<EOL>to_dt = datetime.datetime.fromtimestamp(to)<EOL>for commit in self.repo.get_commits(sha=branch, since=since_dt, until=to_dt):<EOL><INDENT>commits[commit.sha] = self._commitData(commit)<EOL><DEDENT>return commits<EOL>
For given branch return a list of commits.
        Each commit contains basic information about itself.

        Raises GithubException if rate limit is exceeded

        :param branch: git branch
        :type  branch: str
        :param since: minimal timestamp for commit's commit date
        :type  since: int
        :param to: maximal timestamp for commit's commit date
        :type  to: int