Skip to content

Commit

Permalink
patch 19
Browse files Browse the repository at this point in the history
patch19
  • Loading branch information
piotrnarajowski committed Jul 17, 2024
1 parent 00e578b commit 5cb816d
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/check_for_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ def run_cmd(cmd: str) -> list[str]:

def main():
# Debug: Check the current working directory
print(os.environ)
current_dir = os.getcwd()
print(f"Current working directory: {current_dir}")
# current_dir = os.getcwd()
# print(f"Current working directory: {current_dir}")

# Debug: Check the contents of the current directory
# contents = os.listdir(current_dir)
Expand All @@ -38,22 +37,22 @@ def main():
mb = run_cmd(f"git merge-base {upstream} {commit}")
upstream = mb[0]

remote = subprocess.run(
['git', 'remote', '-v'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True
)

print(f"Git remote -v: {remote}")
# remote = subprocess.run(
# ['git', 'remote', '-v'],
# stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True
# )

rev_parse = subprocess.run(
['git', 'rev-parse', 'HEAD', 'HEAD^', 'master', 'origin/master'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True
)
# print(f"Git remote -v: {remote}")/

print(f"Rev parse result: HEAD, HEAD^, master. origin/master {rev_parse}")
# rev_parse = subprocess.run(
# ['git', 'rev-parse', 'HEAD', 'HEAD^', 'master', 'origin/master'],
# stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True
# )
#
# print(f"Rev parse result: HEAD, HEAD^, master. origin/master {rev_parse}")

result = subprocess.run(
['git', 'diff', '--name-only', upstream, commit, '--', 'autopts/wid/'],
['git', 'diff', '--name-only', 'GITHUB_BASE_REF', 'GITHUB_HEAD_REF', '--', 'autopts/wid/'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True
)

Expand Down

0 comments on commit 5cb816d

Please sign in to comment.