-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add latest changes from gitlab-org/gitlab@master
- Loading branch information
GitLab Bot
committed
Nov 25, 2020
1 parent
4fc6f62
commit af9ff2b
Showing
13 changed files
with
737 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Types | ||
module Ci | ||
class JobArtifactFileTypeEnum < BaseEnum | ||
graphql_name 'JobArtifactFileType' | ||
|
||
::Ci::JobArtifact::TYPE_AND_FORMAT_PAIRS.keys.each do |file_type| | ||
value file_type.to_s.upcase, value: file_type.to_s | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
module Types | ||
module Ci | ||
# rubocop: disable Graphql/AuthorizeTypes | ||
class JobArtifactType < BaseObject | ||
graphql_name 'CiJobArtifact' | ||
|
||
field :download_path, GraphQL::STRING_TYPE, null: true, | ||
description: "URL for downloading the artifact's file" | ||
|
||
field :file_type, ::Types::Ci::JobArtifactFileTypeEnum, null: true, | ||
description: 'File type of the artifact' | ||
|
||
def download_path | ||
::Gitlab::Routing.url_helpers.download_project_job_artifacts_path( | ||
object.project, | ||
object.job, | ||
file_type: object.file_type | ||
) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Add artifacts field to JobType | ||
merge_request: 48207 | ||
author: | ||
type: added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.