Add namespace to dist-git fedmsg messages (#5245)
For https://fedorahosted.org/fedora-infrastructure/ticket/5245
This commit is contained in:
parent
741b48ee14
commit
0e13d8d48d
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,7 @@ import fedmsg.config
|
||||||
abspath = os.path.abspath(os.environ['GIT_DIR'])
|
abspath = os.path.abspath(os.environ['GIT_DIR'])
|
||||||
# This assumes git root dir is named "repo_name.git"
|
# This assumes git root dir is named "repo_name.git"
|
||||||
repo_name = '.'.join(abspath.split(os.path.sep)[-1].split('.')[:-1])
|
repo_name = '.'.join(abspath.split(os.path.sep)[-1].split('.')[:-1])
|
||||||
|
namespace = abspath.split(os.path.sep)[-2]
|
||||||
|
|
||||||
username = getpass.getuser()
|
username = getpass.getuser()
|
||||||
|
|
||||||
|
@ -111,6 +112,7 @@ for line in lines:
|
||||||
rev=unicode(rev),
|
rev=unicode(rev),
|
||||||
path=abspath,
|
path=abspath,
|
||||||
repo=repo_name,
|
repo=repo_name,
|
||||||
|
namespace=namespace,
|
||||||
branch=branch,
|
branch=branch,
|
||||||
agent=os.getlogin(),
|
agent=os.getlogin(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue