diff options
Diffstat (limited to 'app/blueprints')
-rw-r--r-- | app/blueprints/github/__init__.py | 4 | ||||
-rw-r--r-- | app/blueprints/gitlab/__init__.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/blueprints/github/__init__.py b/app/blueprints/github/__init__.py index 2eb4f64..bc83922 100644 --- a/app/blueprints/github/__init__.py +++ b/app/blueprints/github/__init__.py @@ -90,9 +90,9 @@ def webhook(): # Get package github_url = "github.com/" + json["repository"]["full_name"] - package = Package.query.filter(Package.repo.like("%{}%".format(github_url))).first() + package = Package.query.filter(Package.repo.ilike("%{}%".format(github_url))).first() if package is None: - return error(400, "Could not find package, did you set the VCS repo in CDB correctly?") + return error(400, "Could not find package, did you set the VCS repo in CDB correctly? Expected {}".format(github_url)) # Get all tokens for package tokens_query = APIToken.query.filter(or_(APIToken.package==package, diff --git a/app/blueprints/gitlab/__init__.py b/app/blueprints/gitlab/__init__.py index 84061d7..18ce8c2 100644 --- a/app/blueprints/gitlab/__init__.py +++ b/app/blueprints/gitlab/__init__.py @@ -30,9 +30,9 @@ def webhook(): # Get package gitlab_url = "gitlab.com/{}/{}".format(json["project"]["namespace"], json["project"]["name"]) - package = Package.query.filter(Package.repo.like("%{}%".format(gitlab_url))).first() + package = Package.query.filter(Package.repo.ilike("%{}%".format(gitlab_url))).first() if package is None: - return error(400, "Unknown package") + return error(400, "Could not find package, did you set the VCS repo in CDB correctly? Expected {}".format(gitlab_url)) # Get all tokens for package secret = request.headers.get("X-Gitlab-Token") |