Skip to content

Commit

Permalink
Merge pull request #12 from smallbirdking/main
Browse files Browse the repository at this point in the history
final fix
  • Loading branch information
OpenGuidou authored Jun 7, 2024
2 parents 88c35d8 + 845dd60 commit b3f45c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions helpers/GitHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from git import Repo


class GitHelper(object):
"""
Helper class for GIT
Expand Down Expand Up @@ -43,9 +44,11 @@ def push_changes_in_pull_request(self, repository, message, target_branch, head_
r.git.execute(['git', 'checkout', '-b', target_branch])
files_to_add = r.git.execute(
['git', 'ls-files', '--others', '--exclude-standard', 'grep', '\\.java', '|', 'grep', 'src/test'])
r.git.execute(['git', 'add', files_to_add])
files_to_add = files_to_add.split("\n")
for file in files_to_add:
r.git.execute(['git', 'add', file])
r.git.commit('-am', message)
origin = r.remote(name='origin')
origin.push(target_branch)

self.create_pull_request(repository, message, '', target_branch, head_branch, token)
self.create_pull_request(repository, message, '', target_branch, head_branch, token)

0 comments on commit b3f45c1

Please sign in to comment.