Skip to content

Commit 5bd7f36

Browse files
committed
Replace run_id with actor_id when collecting events analytics
1 parent fa3f59c commit 5bd7f36

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/analytics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def post(event_id):
4242
4343
event_id - str - similar to a page URL, e.g. `pull_request_comment`
4444
referrer - str - e.g. https://github.com
45-
run_id - str or int - individual run id needed to count unique events
45+
actor_id - str or int - account ID which triggered the event
4646
"""
4747
if not strtobool(os.environ.get("INPUT_ANONYMOUS-ANALYTICS", "true")):
4848
if strtobool(os.environ.get("INPUT_DEBUG", "false")):
4949
click.echo(f"INFO: Anonymous analytics has been disabled for /{event_id}")
5050
return
5151

52-
run_id = os.environ["GITHUB_RUN_ID"]
52+
actor_id = os.environ["GITHUB_ACTOR_ID"]
5353
referrer = os.environ["GITHUB_SERVER_URL"]
5454

5555
response = requests.post(
@@ -64,7 +64,7 @@ def post(event_id):
6464
},
6565
},
6666
headers={
67-
"User-Agent": f"kiwitcms-gitops/{__version__}.{run_id}",
67+
"User-Agent": f"kiwitcms-gitops/{__version__}.{actor_id}",
6868
"Content-Type": "application/json",
6969
},
7070
timeout=10,

0 commit comments

Comments
 (0)