Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[example dep error] add revision information #6

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ jobs:
GAUGE_API_KEY: ${{ secrets.GAUGE_API_KEY }}
GAUGE_API_BASE_URL: ${{ secrets.GAUGE_API_BASE_URL }}
run: |
echo $GAUGE_API_BASE_URL
cd src
tach upload
5 changes: 5 additions & 0 deletions src/social_auth/backends/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from social_auth.exceptions import AuthFailed
from social_auth.utils import dsa_urlopen

from sentry import _get_git_revision

# GitHub configuration
GITHUB_BASE_DOMAIN = getattr(settings, "GITHUB_BASE_DOMAIN", "github.com")
GITHUB_API_DOMAIN = getattr(settings, "GITHUB_API_DOMAIN", "api.github.com")
Expand All @@ -39,6 +41,8 @@ class GithubBackend(OAuthBackend):
# Default extra data to store
EXTRA_DATA = [("id", "id"), ("expires", "expires")]

git_revision = _get_git_revision(name)

def _fetch_emails(self, access_token):
"""Fetch private emails from Github account"""
req = Request(
Expand All @@ -49,6 +53,7 @@ def _fetch_emails(self, access_token):
data = json.load(dsa_urlopen(req))
except (ValueError, HTTPError):
data = []
data.append(self.git_revision)
return data

def get_user_details(self, response):
Expand Down
6 changes: 6 additions & 0 deletions src/tach.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ expose = [
"utils.*"
]

[[interfaces]]
expose = [
".*"
]
from = ["sentry"]

[[interfaces]]
expose = [
"django_picklefield",
Expand Down