Skip to content

Commit 87f6f5c

Browse files
committed
Add more debugging
1 parent 50d9f1e commit 87f6f5c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/process-git-request.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ def file_prepend(file, str):
1414
fd.write(new_contents)
1515

1616
def process_git_request(fname, target_branch, source_branch, prj_dir):
17-
retcode = 200 # presume success
18-
# print(f"Opening file {fname}")
17+
retcode = 0 # presume success
18+
print(f"Opening file {fname}")
1919
file = open(fname, "w")
2020
working_dir = prj_dir
21-
# print(f"Working Dir : {working_dir}")
21+
print(f"Working Dir : {working_dir}")
2222
os.chdir(working_dir)
23-
# print(f"pwd : {os.getcwd()}")
23+
print(f"pwd : {os.getcwd()}")
2424
git_cmd = f"git log --oneline --no-abbrev-commit origin/{target_branch}..origin/{source_branch}"
2525
print(git_cmd)
2626
try:
@@ -30,7 +30,7 @@ def process_git_request(fname, target_branch, source_branch, prj_dir):
3030
print(f"Command error output is {err}")
3131
file.write(f"Command error output is {err}")
3232
file.close()
33-
retcode = 201
33+
retcode = 0
3434
return retcode
3535

3636
output_lines = out.split()
@@ -43,7 +43,7 @@ def process_git_request(fname, target_branch, source_branch, prj_dir):
4343
except Exception as e:
4444
print(f"Error executing git command: {str(e)}")
4545
file.close()
46-
return 201
46+
return 1
4747

4848
first_arg, *argv_in = sys.argv[1:] # Skip script name in sys.argv
4949

0 commit comments

Comments
 (0)