Skip to content

Commit

Permalink
Include real name in generated changelog entries
Browse files Browse the repository at this point in the history
Produce entries just like osc vc.
  • Loading branch information
Vogtinator committed Aug 12, 2024
1 parent eafa0f5 commit 9afe53c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions TarSCM/changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,20 @@ def get_changesauthor(self, args):
return args.changesauthor

# return changesauthor if set by osc
if os.getenv('VC_MAILADDR'):
realname, mailaddr = os.getenv('VC_REALNAME'), os.getenv('VC_MAILADDR')
if mailaddr is not None and realname is not None:
logging.debug("Found VC_REALNAME='%s' and VC_MAILADDR='%s'",
realname, mailaddr)
return "%s <%s>" % (realname, mailaddr)

if mailaddr is not None:
logging.debug("Found changesauthor in VC_MAILADDR='%s'",
os.environ['VC_MAILADDR'])
return os.environ['VC_MAILADDR']
mailaddr)
return mailaddr

# return default changesauthor if running on server side
if os.getenv('OBS_SERVICE_DAEMON'):
logging.debug("Running in daemon mode. Using DEFAULT_AUHTOR='%s'",
logging.debug("Running in daemon mode. Using DEFAULT_AUTHOR='%s'",
Cli.DEFAULT_AUTHOR)
return Cli.DEFAULT_AUTHOR

Expand Down

0 comments on commit 9afe53c

Please sign in to comment.