From 045ccaa6417651ee6fcda6b0ee227e96e5d649dd Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 13 Aug 2019 19:00:56 +0900 Subject: [PATCH] Ignore events for tags and remotes --- create-pull-request.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/create-pull-request.py b/create-pull-request.py index 3e0338d..c5756de 100755 --- a/create-pull-request.py +++ b/create-pull-request.py @@ -24,6 +24,10 @@ def ignore_event(github_event): if deleted == "True": print("Ignoring delete branch event.") return True + ref = "{ref}".format(**github_event) + if not ref.startswith('refs/heads/'): + print("Ignoring events for tags and remotes.") + return True return False