File tree 8 files changed +29
-14
lines changed
cancel_and_rerun_workflow_lambda
workflow_approve_rerun_lambda
8 files changed +29
-14
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,10 @@ def get_installation_id(jwt_token):
53
53
response = requests .get ("https://api.github.com/app/installations" , headers = headers )
54
54
response .raise_for_status ()
55
55
data = response .json ()
56
- return data [0 ]["id" ]
56
+ for installation in data :
57
+ if installation ["account" ]["login" ] == "ClickHouse" :
58
+ installation_id = installation ["id" ]
59
+ return installation_id
57
60
58
61
59
62
def get_access_token (jwt_token , installation_id ):
Original file line number Diff line number Diff line change 1
1
FROM public.ecr.aws/lambda/python:3.9
2
2
3
- # Copy function code
4
- COPY app.py ${LAMBDA_TASK_ROOT}
5
-
6
3
# Install the function's dependencies using file requirements.txt
7
4
# from your project folder.
8
5
9
6
COPY requirements.txt .
10
7
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
11
8
9
+ # Copy function code
10
+ COPY app.py ${LAMBDA_TASK_ROOT}
11
+
12
12
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
13
13
CMD [ "app.handler" ]
Original file line number Diff line number Diff line change @@ -100,7 +100,10 @@ def get_installation_id(jwt_token):
100
100
response = requests .get ("https://api.github.com/app/installations" , headers = headers )
101
101
response .raise_for_status ()
102
102
data = response .json ()
103
- return data [0 ]["id" ]
103
+ for installation in data :
104
+ if installation ["account" ]["login" ] == "ClickHouse" :
105
+ installation_id = installation ["id" ]
106
+ return installation_id
104
107
105
108
106
109
def get_access_token (jwt_token , installation_id ):
Original file line number Diff line number Diff line change 1
1
FROM public.ecr.aws/lambda/python:3.9
2
2
3
- # Copy function code
4
- COPY app.py ${LAMBDA_TASK_ROOT}
5
-
6
3
# Install the function's dependencies using file requirements.txt
7
4
# from your project folder.
8
5
9
6
COPY requirements.txt .
10
7
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
11
8
9
+ # Copy function code
10
+ COPY app.py ${LAMBDA_TASK_ROOT}
11
+
12
12
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
13
13
CMD [ "app.handler" ]
Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ def get_installation_id(jwt_token):
30
30
response = requests .get ("https://api.github.com/app/installations" , headers = headers )
31
31
response .raise_for_status ()
32
32
data = response .json ()
33
- return data [0 ]["id" ]
33
+ for installation in data :
34
+ if installation ["account" ]["login" ] == "ClickHouse" :
35
+ installation_id = installation ["id" ]
36
+ return installation_id
34
37
35
38
36
39
def get_access_token (jwt_token , installation_id ):
Original file line number Diff line number Diff line change 1
1
FROM public.ecr.aws/lambda/python:3.9
2
2
3
- # Copy function code
4
- COPY app.py ${LAMBDA_TASK_ROOT}
5
-
6
3
# Install the function's dependencies using file requirements.txt
7
4
# from your project folder.
8
5
9
6
COPY requirements.txt .
10
7
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
11
8
9
+ # Copy function code
10
+ COPY app.py ${LAMBDA_TASK_ROOT}
11
+
12
12
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
13
13
CMD [ "app.handler" ]
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ def get_installation_id(jwt_token):
16
16
response = requests .get ("https://api.github.com/app/installations" , headers = headers )
17
17
response .raise_for_status ()
18
18
data = response .json ()
19
- return data [0 ]["id" ]
19
+ for installation in data :
20
+ if installation ["account" ]["login" ] == "ClickHouse" :
21
+ installation_id = installation ["id" ]
22
+ return installation_id
20
23
21
24
22
25
def get_access_token (jwt_token , installation_id ):
Original file line number Diff line number Diff line change @@ -139,7 +139,10 @@ def get_installation_id(jwt_token):
139
139
response = requests .get ("https://api.github.com/app/installations" , headers = headers )
140
140
response .raise_for_status ()
141
141
data = response .json ()
142
- return data [0 ]["id" ]
142
+ for installation in data :
143
+ if installation ["account" ]["login" ] == "ClickHouse" :
144
+ installation_id = installation ["id" ]
145
+ return installation_id
143
146
144
147
145
148
def get_access_token (jwt_token , installation_id ):
You can’t perform that action at this time.
0 commit comments