diff --git a/src/sentry_plugins/github/plugin.py b/src/sentry_plugins/github/plugin.py
index <HASH>..<HASH> 100644
--- a/src/sentry_plugins/github/plugin.py
+++ b/src/sentry_plugins/github/plugin.py
@@ -334,8 +334,10 @@ class GitHubRepositoryProvider(GitHubMixin, providers.RepositoryProvider):
             raise NotImplementedError('Cannot fetch commits anonymously')
 
         client = self.get_client(actor)
+        # use config name because that is kept in sync via webhooks
+        name = repo.config['name']
         try:
-            res = client.compare_commits(repo, start_sha, end_sha)
+            res = client.compare_commits(name, start_sha, end_sha)
         except Exception as e:
             self.raise_error(e)
-        return [{'id': c['sha'], 'repository': repo} for c in res['commits']]
+        return [{'id': c['sha'], 'repository': repo.name} for c in res['commits']]
update compare_commits to take repo model (#<I>)

* update compare_commits to take repo model



* allow keyerrors