Skip to content

Commit 22efd5a

Browse files
committed
minor style change
1 parent cbcbd9c commit 22efd5a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.gitlab/hpsf-gitlab-ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)