File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 2121
2222 - name : Check rules on the wiki page
2323 run : python scripts/check_rules_on_wiki.py -ci
24+ env :
25+ WIKI_TOKEN_GHA : ${{ secrets.WIKI_TOKEN_GHA }}
Original file line number Diff line number Diff line change @@ -63,6 +63,13 @@ def __init__(self) -> None:
6363 def get_rules_on_wiki_page (self ) -> set :
6464 """Get the list of rules on the wiki page."""
6565 req = Request (self .wiki_page_url )
66+
67+ # When running on GitHub Actions, we need to add the token to the request
68+ # to access the wiki page. Otherwise, we get a 403 error.
69+ wiki_token = os .environ .get ("WIKI_TOKEN_GHA" )
70+ if wiki_token :
71+ req .add_header ("bugbotgha" , wiki_token )
72+
6673 with urlopen (req ) as resp :
6774 wiki_page_content = resp .read ().decode ("utf-8" )
6875
You can’t perform that action at this time.
0 commit comments