Skip to content

Commit 6166d55

Browse files
committed
Record repository type anonymous analytics
1 parent 19fa1c0 commit 6166d55

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

app/analytics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def post(event_id, duration_in_secs):
8282
"props": {
8383
"duration": duration_in_secs,
8484
"version": __version__,
85+
"repository_type": os.environ.get("_APP_REPOSITORY_TYPE")
8586
},
8687
},
8788
headers={

app/entrypoint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ def main():
5858

5959
__trigger__ = events.load()
6060

61+
# will be used by anonymous analytics
62+
os.environ["_APP_REPOSITORY_TYPE"] = "public"
63+
if __trigger__.private:
64+
os.environ["_APP_REPOSITORY_TYPE"] = "private"
65+
6166
if strtobool(os.environ.get("INPUT_DEBUG", "false")):
6267
import pprint
6368

0 commit comments

Comments
 (0)