Skip to content

Commit

Permalink
Testing: git push auto fixed files (#4183)
Browse files Browse the repository at this point in the history
* chore(deps): update trufflesecurity/trufflehog docker tag to v3.82.12 (#4179)

* chore(deps): update dependency sfdx-hardis to v5.2.4 (#4178)

* changes from prev PR

* GitCommandError

* correcting git commands

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
lukelloyd1985 and renovate[bot] authored Oct 24, 2024
1 parent 6f241f1 commit 6c3cd31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions megalinter/reporters/UpdatedSourcesReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def produce_report(self):
try:
repo = git.Repo(os.path.realpath(self.master.github_workspace))
repo.git.add(update=True)
repo.git.commit("megalinter auto fixes")
repo.git.push
except Exception as exp:
repo.git.commit('-m', 'megalinter auto fixes')
repo.git.push()
except git.GitCommandError as giterr:
logging.error(
"[Updated Sources Reporter] Failed to git push auto fixes: " + str(exp.message) + "\n"
"[Updated Sources Reporter] Failed to git push auto fixes: " + str(giterr.stderr) + "\n"
"Download it from artifacts then copy-paste it in your local repo to apply linters updates"
)
else:
Expand Down

0 comments on commit 6c3cd31

Please sign in to comment.