File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -160,13 +160,12 @@ post_github_comment:
160160
161161 # Get installation access token
162162 installation_id = os.environ['GITHUB_APP_INSTALLATION_ID']
163- headers = {
164- 'Authorization': f'Bearer {token}',
165- 'Accept': 'application/vnd.github+json'
166- }
167163 token_response = requests.post(
168164 f'https://api.github.com/app/installations/{installation_id}/access_tokens',
169- headers=headers
165+ headers = {
166+ 'Authorization': f'Bearer {token}',
167+ 'Accept': 'application/vnd.github+json'
168+ }
170169 )
171170 if token_response.status_code != 201:
172171 print(f"Failed to get access token: HTTP {token_response.status_code}")
@@ -186,11 +185,9 @@ post_github_comment:
186185 },
187186 json={'body': comment_body}
188187 )
189- del token_response
190188 if comment_response.status_code != 201:
191189 print(f"Failed to post comment: HTTP {comment_response.status_code}")
192190 sys.exit(1)
193- del comment_response
194191 print("Successfully posted comment to GitHub PR")
195192 EOF
196193 when : always
You can’t perform that action at this time.
0 commit comments