diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-06-03 16:32:39 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-06-03 16:32:39 +0100 |
commit | 7f650a619e8ff1358b39ed7707cc53fff377c31e (patch) | |
tree | b01ff2b97f636c41f0bd196e15cfb35df5f1635b /app/blueprints/gitlab/__init__.py | |
parent | d7977dec84b54d30c62506a899139eebe99ccaa8 (diff) | |
download | cheatdb-7f650a619e8ff1358b39ed7707cc53fff377c31e.tar.xz |
Fix webhook issues, make repo URLs matched case insensitive
Diffstat (limited to 'app/blueprints/gitlab/__init__.py')
-rw-r--r-- | app/blueprints/gitlab/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
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") |