Do not seng git.receive fedmsg message upon changes to the requests git repo

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2018-12-13 14:50:43 +01:00
parent 5f1f04a417
commit ef61cb0d11

View file

@ -14,6 +14,9 @@ import fedmsg.config
# Use $GIT_DIR to determine where this repo is.
abspath = os.path.abspath(os.environ['GIT_DIR'])
if "/requests/" in abspath:
sys.exit(0)
# 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]