@@ -170,16 +170,16 @@ def get_activity(
170170 search_query = f"user:{ org } "
171171
172172 if auth is None :
173- for kind in ["GITHUB_ACCESS_TOKEN" , "GHA_ACCESS_TOKEN" ]:
174- if kind in os .environ :
173+ for authkey in ["GITHUB_ACCESS_TOKEN" , "GHA_ACCESS_TOKEN" ]:
174+ if authkey in os .environ :
175175 # Access token is stored in a local environment variable so just use this
176176 print (
177- f"Using GH access token stored in `{ kind } `." ,
177+ f"Using GH access token stored in `{ authkey } `." ,
178178 file = sys .stderr ,
179179 )
180- auth = os .environ .get (kind )
180+ auth = os .environ .get (authkey )
181181 if auth == "" :
182- raise ValueError (f"Found { kind } , but it is empty..." )
182+ raise ValueError (f"Found { authkey } , but it is empty..." )
183183
184184 if auth is None :
185185 # Attempt to use the gh cli if installed
@@ -220,7 +220,7 @@ def get_activity(
220220 if kind :
221221 allowed_kinds = ["issue" , "pr" ]
222222 if kind not in allowed_kinds :
223- raise ValueError (f"Kind must be one of { allowed_kinds } " )
223+ raise ValueError (f"Kind must be one of { allowed_kinds } , got { kind } " )
224224 search_query += f" type:{ kind } "
225225
226226 # Query for both opened and closed issues/PRs in this window
0 commit comments