diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-08 09:17:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-08 09:17:44 +0000 |
commit | efe3186770a4218333e1a720f1e4d3794892673e (patch) | |
tree | b637f816536c38ac920373aeb5c58b1540f8d921 /lib | |
parent | 6eed20a9c4ecc6ad0ce1615c9922eb615db7a45f (diff) | |
download | gitlab-ce-efe3186770a4218333e1a720f1e4d3794892673e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities/project.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/jwt.rb | 10 |
2 files changed, 4 insertions, 8 deletions
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 |