Skip to content

Commit

Permalink
configure name in git
Browse files Browse the repository at this point in the history
  • Loading branch information
almenscorner committed Feb 24, 2024
1 parent b33937e commit 39fd6a5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/IntuneCD/intunecdlib/process_audit_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ def _configure_git(audit_data, path):
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False
)

# configure the user name for git commits
cmd = [
"git",
"-C",
path,
"config",
"--local",
"user.name",
f"{audit_data['actor']}",
]
log("_configure_git", f"Running command {cmd} to configure git user name.")
subprocess.run(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False
)


def _check_if_git_repo(path, file):
cmd = ["git", "-C", path, "rev-parse", "--is-inside-work-tree"]
Expand Down

0 comments on commit 39fd6a5

Please sign in to comment.