diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-08-30 18:03:16 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-08-30 18:03:16 +0000 |
commit | 51087cfa1a6b0bb5a7abf35081ed3b669253eb4f (patch) | |
tree | 3a90808c1671f9ba1686c3a593e84081a3162c4b /lib/api/commit_statuses.rb | |
parent | 90c7a4117a68f5e019fed314076f6fcefbed9ac0 (diff) | |
parent | 41a0b7b22f7cdec7d216f32d561442c9fc3587be (diff) | |
download | gitlab-ce-51087cfa1a6b0bb5a7abf35081ed3b669253eb4f.tar.gz |
Merge branch 'artifacts-from-ref-and-build-name' into 'master'
Add a download buttons for Build Artifacts
## What does this MR do?
This MR adds a download buttons for build artifacts of latest succesful pipeline in:
- dashboard of project,
- branches and tags views,
- and tree viewer
Implement #4255
## What are the relevant issue numbers?
Closes #4255, Closes #14419
## Screenshots
### Project main

### Branches

### Tags

### Source Tree

## Does this MR meet the acceptance criteria?
- [x] [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)
- [x] Download buttons
- [x] Models
- [x] Routes
- [x] Projects::ArtifactsController
- [x] API
- Tests
- Rails
- [x] Project#builds_for
- [x] branch name with slashes
- [x] only success builds
- [x] only latest builds
- [x] feature tests for download buttons
- API
- [x] branch name with slashes
- [x] only success builds
- [x] only latest builds
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5142
Diffstat (limited to 'lib/api/commit_statuses.rb')
-rw-r--r-- | lib/api/commit_statuses.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 4df6ca8333e..5e3c9563703 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -64,7 +64,7 @@ module API ref = branches.first end - pipeline = @project.ensure_pipeline(commit.sha, ref, current_user) + pipeline = @project.ensure_pipeline(ref, commit.sha, current_user) name = params[:name] || params[:context] status = GenericCommitStatus.running_or_pending.find_by(pipeline: pipeline, name: name, ref: params[:ref]) |