Skip to content
Snippets Groups Projects
Commit 9d1a1154 authored by Christoph Alt's avatar Christoph Alt
Browse files

remove new lines in commit messages

parent fd51fe59
Branches
No related tags found
No related merge requests found
Pipeline #51843 passed
...@@ -62,11 +62,12 @@ def get_git_infos(repo_path: Union[Path, str], *, commit_key="commit", commit_ms ...@@ -62,11 +62,12 @@ def get_git_infos(repo_path: Union[Path, str], *, commit_key="commit", commit_ms
def get_git_infos_from_env(): def get_git_infos_from_env():
""" Extract commit, commit message, branch and project id from gitlab ci environment.""" """ Extract commit, commit message, branch and project id from gitlab ci environment."""
return {"commit": os.environ["CI_COMMIT_SHA"], return {
"commit_message": os.environ["CI_COMMIT_MESSAGE"], "commit": os.environ["CI_COMMIT_SHA"],
"project_id": os.environ["CI_PROJECT_ID"], "commit_message": remove_newline(os.environ["CI_COMMIT_MESSAGE"]),
"branch": os.environ["CI_COMMIT_BRANCH"], "project_id": os.environ["CI_PROJECT_ID"],
} "branch": os.environ["CI_COMMIT_BRANCH"],
}
def file_time_to_sec(file_path) -> int: def file_time_to_sec(file_path) -> int:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment