From efe3186770a4218333e1a720f1e4d3794892673e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 8 May 2023 09:17:44 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/api/entities/project.rb | 2 ++ lib/gitlab/ci/jwt.rb | 10 ++-------- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/api/entities/project.rb b/lib/api/entities/project.rb index 78ee5f07868..06e636d0301 100644 --- a/lib/api/entities/project.rb +++ b/lib/api/entities/project.rb @@ -103,6 +103,8 @@ module API project.import_state&.last_error end expose :open_issues_count, documentation: { type: 'integer', example: 1 }, if: lambda { |project, options| project.feature_available?(:issues, options[:current_user]) } + expose :description_html, documentation: { type: 'string' } + expose :updated_at, documentation: { type: 'dateTime', example: '2020-05-07T04:27:17.016Z' } with_options if: ->(_, _) { Ability.allowed?(options[:current_user], :admin_project, project) } do # CI/CD Settings diff --git a/lib/gitlab/ci/jwt.rb b/lib/gitlab/ci/jwt.rb index 068e6f5949d..4ba7b4cc6e1 100644 --- a/lib/gitlab/ci/jwt.rb +++ b/lib/gitlab/ci/jwt.rb @@ -33,6 +33,8 @@ module Gitlab delegate :project, :user, :pipeline, :runner, to: :build delegate :source_ref, :source_ref_path, to: :pipeline + delegate :public_key, to: :key + delegate :namespace, to: :project def reserved_claims now = Time.now.to_i @@ -86,18 +88,10 @@ module Gitlab end end - def public_key - key.public_key - end - def kid public_key.to_jwk[:kid] end - def namespace - project.namespace - end - def ref_type ::Ci::BuildRunnerPresenter.new(build).ref_type end -- cgit v1.2.1