BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d6c58a51
Commit
d6c58a51
authored
Aug 24, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only use symbols instead of enum hash accessor
parent
7ad7222a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
commit.rb
lib/gitlab/gpg/commit.rb
+7
-7
No files found.
lib/gitlab/gpg/commit.rb
View file @
d6c58a51
...
@@ -77,22 +77,22 @@ module Gitlab
...
@@ -77,22 +77,22 @@ module Gitlab
gpg_key_primary_keyid:
gpg_key
&
.
primary_keyid
||
verified_signature
.
fingerprint
,
gpg_key_primary_keyid:
gpg_key
&
.
primary_keyid
||
verified_signature
.
fingerprint
,
gpg_key_user_name:
user_infos
[
:name
],
gpg_key_user_name:
user_infos
[
:name
],
gpg_key_user_email:
user_infos
[
:email
],
gpg_key_user_email:
user_infos
[
:email
],
valid_signature:
verification_status
==
GpgSignature
.
verification_statuses
[
:verified
]
,
valid_signature:
verification_status
==
:verified
,
verification_status:
verification_status
verification_status:
verification_status
}
}
end
end
def
verification_status
(
gpg_key
)
def
verification_status
(
gpg_key
)
return
GpgSignature
.
verification_statuses
[
:unknown_key
]
unless
gpg_key
return
:unknown_key
unless
gpg_key
return
GpgSignature
.
verification_statuses
[
:unverified_key
]
unless
gpg_key
.
verified?
return
:unverified_key
unless
gpg_key
.
verified?
return
GpgSignature
.
verification_statuses
[
:unverified
]
unless
verified_signature
.
valid?
return
:unverified
unless
verified_signature
.
valid?
if
gpg_key
.
verified_and_belongs_to_email?
(
@commit
.
committer_email
)
if
gpg_key
.
verified_and_belongs_to_email?
(
@commit
.
committer_email
)
GpgSignature
.
verification_statuses
[
:verified
]
:verified
elsif
gpg_key
.
user
.
all_emails
.
include?
(
@commit
.
committer_email
)
elsif
gpg_key
.
user
.
all_emails
.
include?
(
@commit
.
committer_email
)
GpgSignature
.
verification_statuses
[
:same_user_different_email
]
:same_user_different_email
else
else
GpgSignature
.
verification_statuses
[
:other_user
]
:other_user
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment