Add namespace to dist-git fedmsg messages (#5245)

For https://fedorahosted.org/fedora-infrastructure/ticket/5245
This commit is contained in:
Ralph Bean 2016-08-01 15:46:23 +00:00
parent 741b48ee14
commit 0e13d8d48d

View file

@ -16,6 +16,7 @@ import fedmsg.config
abspath = os.path.abspath(os.environ['GIT_DIR'])
# This assumes git root dir is named "repo_name.git"
repo_name = '.'.join(abspath.split(os.path.sep)[-1].split('.')[:-1])
namespace = abspath.split(os.path.sep)[-2]
username = getpass.getuser()
@ -111,6 +112,7 @@ for line in lines:
rev=unicode(rev),
path=abspath,
repo=repo_name,
namespace=namespace,
branch=branch,
agent=os.getlogin(),
)