summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2016-08-01 15:46:23 +0000
committerRalph Bean <rbean@redhat.com>2016-08-01 15:46:23 +0000
commit0e13d8d48d1b11a2ce0a18d42b338b0bc8b6577c (patch)
tree64f07d0b9d4ca71c581d2f9fe841af5087d5fb75
parent741b48ee1450c8ed44ed1b93b9f654cd8caa519c (diff)
downloadansible-0e13d8d48d1b11a2ce0a18d42b338b0bc8b6577c.tar.gz
ansible-0e13d8d48d1b11a2ce0a18d42b338b0bc8b6577c.tar.xz
ansible-0e13d8d48d1b11a2ce0a18d42b338b0bc8b6577c.zip
Add namespace to dist-git fedmsg messages (#5245)
For https://fedorahosted.org/fedora-infrastructure/ticket/5245
-rwxr-xr-xroles/git/hooks/files/post-receive-fedmsg2
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/git/hooks/files/post-receive-fedmsg b/roles/git/hooks/files/post-receive-fedmsg
index 699f4e94a..782accde6 100755
--- a/roles/git/hooks/files/post-receive-fedmsg
+++ b/roles/git/hooks/files/post-receive-fedmsg
@@ -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(),
)