diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-14 03:10:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-14 03:10:41 +0300 |
commit | dcd075c981ad8efcdf6206f67e1c82c6ab4b3152 (patch) | |
tree | abddfa196c5972b62eb20259df5f7e2f1cabcac3 /lib | |
parent | 9f4c898b9d7243343ab321227e9cfbfa8babedfe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/auth.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/variables/builder/release.rb | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 6213dd203c4..c567df8e133 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -221,6 +221,8 @@ module Gitlab end if token.user.can_log_in_with_non_expired_password? || token.user.project_bot? + ::PersonalAccessTokens::LastUsedService.new(token).execute + Gitlab::Auth::Result.new(token.user, nil, :personal_access_token, abilities_for_scopes(token.scopes)) end end diff --git a/lib/gitlab/ci/variables/builder/release.rb b/lib/gitlab/ci/variables/builder/release.rb index cde18468f8c..25f3d8446c5 100644 --- a/lib/gitlab/ci/variables/builder/release.rb +++ b/lib/gitlab/ci/variables/builder/release.rb @@ -20,8 +20,12 @@ module Gitlab ::Gitlab::Ci::Variables::Collection.new.tap do |variables| next variables unless release - variables.append( - key: 'CI_RELEASE_DESCRIPTION', value: release.description.truncate(DESCRIPTION_LIMIT), raw: true) + if release.description + variables.append( + key: 'CI_RELEASE_DESCRIPTION', + value: release.description.truncate(DESCRIPTION_LIMIT), + raw: true) + end end end end |