Added support for project-name
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
@@ -20,10 +20,11 @@ class DetectedCommit:
|
||||
_log: str = ""
|
||||
_dict = {}
|
||||
|
||||
def __init__(self, env: dict):
|
||||
def __init__(self, env: dict, project_name: str):
|
||||
for key in env.keys():
|
||||
self.__setattr__(f"_{key}", env[key])
|
||||
self._dict = env
|
||||
self.project = project_name
|
||||
|
||||
@property
|
||||
def commit(self) -> str:
|
||||
@@ -232,7 +233,7 @@ class Detector:
|
||||
'branches': special_branch,
|
||||
'log': commit.message,
|
||||
}
|
||||
env = DetectedCommit(env)
|
||||
env = DetectedCommit(env, self._project)
|
||||
log.info(f"Executing CI: commit {self._project}: {env.commit} @ {env.date} by {env.author}")
|
||||
if env.is_tag or env.is_branch:
|
||||
log.info(f"Additional info: branch: {env.branches}; tag(s) {env.tags}")
|
||||
|
||||
Reference in New Issue
Block a user