Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs committed Feb 22, 2024
1 parent b59299b commit 08e857b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/scripts/check_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import sys
import subprocess

def list_files_on_branch(branch_name):
def list_files_on_branch(first_branch_name, second_branch_name):
# Run git diff command to list files on the specified branch
output = subprocess.check_output(['git', 'diff', '--name-only', f'origin/{branch_name}']).decode().strip()
output = subprocess.check_output(['git', 'diff', '--name-only', f'origin/{first_branch_name}..origin/{second_branch_name}']).decode().strip()
return output.split('\n')


Expand Down Expand Up @@ -35,11 +35,8 @@ def check_migration_file(filepath):

def main():
current_branch_files = list_files_on_branch('HEAD')
develop_branch_files = list_files_on_branch('develop')
print("Files on current branch:")
print('\n'.join(current_branch_files))
print("\nFiles on develop branch:")
print('\n'.join(develop_branch_files))

migration_files = get_migration_files()
main_branch_files = get_main_branch_migration_files()
Expand Down

0 comments on commit 08e857b

Please sign in to comment.