Improve logging around project branches

In order to debug cases with missing jobs it would be helpful to know
which branches are loaded by the github driver as it doesn't load all
branches if exclude-unprotected-branches is enabled (which is
advisable when using github).

Change-Id: I309e86cfb5ff00aa293c5a2aafd9c68602f2a584
This commit is contained in:
Tobias Henkel 2018-05-09 08:42:30 +02:00
parent 1e3e5d33fb
commit d5ffc5e428
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2

View File

@ -890,7 +890,8 @@ class GithubConnection(BaseConnection):
self._project_branch_cache[project.name] = [
branch.name for branch in repository.branches(
protected=exclude_unprotected)]
self.log.debug('Got project branches for %s', project.name)
self.log.debug('Got project branches for %s: %s', project.name,
self._project_branch_cache[project.name])
log_rate_limit(self.log, github)
except github3.exceptions.ForbiddenError as e:
self.log.error(str(e), exc_info=True)