File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 3333 runs-on : ubuntu-24.04
3434 env :
3535 # This is a private access token for @choldgraf that has public read-only access.
36- GHA_ACCESS_TOKEN : " ${{ secrets.TOKEN_READONLY }}"
36+ # WARNING: This only works for PRs from non-forked repositories.
37+ # FUTURE: We should update the tests to only pull from this repository and not
38+ # need a token at all.
39+ GITHUB_ACCESS_TOKEN : " ${{ secrets.TOKEN_READONLY }}"
3740 strategy :
3841 matrix :
3942 include :
Original file line number Diff line number Diff line change @@ -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
You can’t perform that action at this time.
0 commit comments