Skip to content

Commit

Permalink
Merge pull request #218 from lxm/feature/aliyun_image_webhook
Browse files Browse the repository at this point in the history
[bugfix] aliyun repo webhook name not match
  • Loading branch information
barnettZQG committed Aug 26, 2019
2 parents c151f15 + b5a499a commit 8b237f9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion console/views/webhook.py
Expand Up @@ -631,7 +631,13 @@ def post(self, request, service_id, *args, **kwargs):
tag = push_data.get("tag")
repo_name = repository.get("repo_name")
if not repo_name:
repo_name = repository.get("repo_full_name")
repository_namespace = repository.get("namespace")
repository_name = repository.get("name")
if repository_namespace and repository_name:
# maybe aliyun repo add fake host
repo_name = "fake.repo.aliyun.com/" + repository_namespace + "/" + repository_name
else:
repo_name = repository.get("repo_full_name")
if not repo_name:
result = general_message(400, "failed", "缺少repository名称信息")
return Response(result, status=400)
Expand Down

0 comments on commit 8b237f9

Please sign in to comment.