Skip to content

Commit

Permalink
fetch first
Browse files Browse the repository at this point in the history
  • Loading branch information
richagadgil committed Dec 19, 2024
1 parent b3127f9 commit 0593f30
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tools/check_stamped.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@ def check_filename(filename: str, fileTuple: tuple or list) -> bool:
def main(branch) -> None:
unsupported_file_types.extend(specificIgnores)

## Get a list of all files (not including deleted) that have changed/added in comparison to the latest Dev branch from MI Graphx

## Fetch the PR branch and target branch
subprocess.run(
f"git fetch https://github.com/ROCmSoftwarePlatform/AMDMIGraphX {branch} --quiet",
shell=True,
stdout=subprocess.PIPE
)
subprocess.run(
"git fetch https://github.com/ROCmSoftwarePlatform/AMDMIGraphX develop --quiet",
shell=True,
stdout=subprocess.PIPE
)

if debug: print(f"PR branch: {branch}")

# Determine the base commit of the PR branch (merge base between PR branch and target branch)
result = subprocess.run(
f"git merge-base {branch} origin/develop",
Expand All @@ -126,7 +142,6 @@ def main(branch) -> None:

if debug:
print(f"Base commit: {base_commit}")
print(f"PR branch: {branch}")
print(f"Target branch: origin/develop")

# Get a list of files that have changed or been added between the base commit and the PR branch
Expand All @@ -142,7 +157,7 @@ def main(branch) -> None:
if debug:
print("Changed/Added Files:")
print("\n".join(fileList))

for file in fileList:
if check_filename(file, supported_file_types):
if needStampCheck(file) and not check_filename(
Expand Down

0 comments on commit 0593f30

Please sign in to comment.