Skip to content

Commit 761b919

Browse files
removed unused function in generate_jwt py file
1 parent c026ddc commit 761b919

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

generate_jwt.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import time
33
import argparse
44
import os
5-
import requests
65

76

87
def create_jwt(private_key, app_id):
@@ -36,23 +35,7 @@ def create_jwt(private_key, app_id):
3635
print(f"JWT set as environment variable: JWT={encoded_jwt}")
3736
return encoded_jwt
3837

39-
def make_github_api_request():
40-
url = " https://api.github.com/app"
41-
headers = {
42-
"Accept": "application/vnd.github+json",
43-
"Authorization": f"Bearer {os.getenv('GITHUB_JWT')}",
44-
"X-GitHub-Api-Version": "2022-11-28"
45-
}
46-
47-
response = requests.get(url, headers=headers)
48-
response_json = response.json()
4938

50-
if response.status_code == 200:
51-
print("API request successful:")
52-
print(response_json)
53-
else:
54-
print(f"API request failed with status code {response.status_code}:")
55-
print(response_json)
5639
def main():
5740
"""
5841
to test the code
@@ -68,7 +51,6 @@ def main():
6851

6952
# function call
7053
create_jwt(private_key, app_id)
71-
make_github_api_request()
7254

7355
if __name__ == "__main__":
7456
main()

0 commit comments

Comments
 (0)