From 04804a0713abd4f32c16631fdbaae7e66648113a Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Fri, 9 Aug 2024 19:24:18 -0400 Subject: [PATCH] Fix auth --- .github/workflows/scan_and_suggest.py | 5 +++++ .github/workflows/scan_and_suggest.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/scan_and_suggest.py b/.github/workflows/scan_and_suggest.py index eafc926..c44c344 100644 --- a/.github/workflows/scan_and_suggest.py +++ b/.github/workflows/scan_and_suggest.py @@ -64,6 +64,11 @@ def create_github_issue(repo_full_name, title, body, token): 'body': body } + print(f"URL: {url}") + print(f"Token: {'*' * len(token)}") # Avoid printing the actual token + print(f"Headers: {headers}") + print(f"Data: {data}") + response = requests.post(url, headers=headers, json=data) if response.status_code == 201: diff --git a/.github/workflows/scan_and_suggest.yml b/.github/workflows/scan_and_suggest.yml index 6b1c3d9..8c6dcce 100644 --- a/.github/workflows/scan_and_suggest.yml +++ b/.github/workflows/scan_and_suggest.yml @@ -28,3 +28,5 @@ jobs: - name: Run script run: | python './.github/workflows/scan_and_suggest.py' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}