diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-10-31 17:09:39 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-10-31 17:09:39 +0300 |
commit | 490776517c394ced2780159fa3800e2accc27601 (patch) | |
tree | 1cea0795bf80cf7a1431d356832cc798d9892edb /app/services | |
parent | 3645e684bf854b3588f5b5a8e069c6a6778a184a (diff) | |
parent | fa3bbd449efb69a42a2347c3c3fa08cd822c2471 (diff) |
Merge branch '22271-drone-tag-pipeline-build' into 'master'
Fix lightweight tags not processed correctly by GitTagPushService
## What does this MR do?
Fix lightweight tags not processed correctly by GitTagPushService
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
Lightweight tags were being processed incorrectly, causing tag triggers to receive wrong information and not function properly.
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #22271
See merge request !6532
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/delete_branch_service.rb | 2 | ||||
-rw-r--r-- | app/services/delete_tag_service.rb | 2 | ||||
-rw-r--r-- | app/services/git_tag_push_service.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/services/delete_branch_service.rb b/app/services/delete_branch_service.rb index 918eddaa53a..3e5dd4ebb86 100644 --- a/app/services/delete_branch_service.rb +++ b/app/services/delete_branch_service.rb @@ -42,7 +42,7 @@ class DeleteBranchService < BaseService Gitlab::DataBuilder::Push.build( project, current_user, - branch.target.sha, + branch.dereferenced_target.sha, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", []) diff --git a/app/services/delete_tag_service.rb b/app/services/delete_tag_service.rb index d0cb151a010..d824406cb49 100644 --- a/app/services/delete_tag_service.rb +++ b/app/services/delete_tag_service.rb @@ -36,7 +36,7 @@ class DeleteTagService < BaseService Gitlab::DataBuilder::Push.build( project, current_user, - tag.target.sha, + tag.dereferenced_target.sha, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}", []) diff --git a/app/services/git_tag_push_service.rb b/app/services/git_tag_push_service.rb index e6002b03b93..20a4445bddf 100644 --- a/app/services/git_tag_push_service.rb +++ b/app/services/git_tag_push_service.rb @@ -27,8 +27,8 @@ class GitTagPushService < BaseService tag_name = Gitlab::Git.ref_name(params[:ref]) tag = project.repository.find_tag(tag_name) - if tag && tag.object_sha == params[:newrev] - commit = project.commit(tag.target) + if tag && tag.target == params[:newrev] + commit = project.commit(tag.dereferenced_target) commits = [commit].compact message = tag.message end |