Class: TxghServer::Webhooks::Gitlab::PushAttributes
Constant Summary
TxghServer::Webhooks::Git::PushAttributes::ATTRIBUTES
Class Method Summary
collapse
after, before, event, #files, from_webhook_payload, #initialize, ref, #to_h
Class Method Details
.added_files(payload) ⇒ Object
10
11
12
|
# File 'lib/txgh-server/webhooks/gitlab/push_attributes.rb', line 10
def added_files(payload)
(payload, 'added')
end
|
.author(payload) ⇒ Object
18
19
20
|
# File 'lib/txgh-server/webhooks/gitlab/push_attributes.rb', line 18
def author(payload)
payload.fetch('user_name')
end
|
22
23
24
|
# File 'lib/txgh-server/webhooks/gitlab/push_attributes.rb', line 22
def (payload, state)
payload.fetch('commits').flat_map { |c| c[state] }.uniq
end
|
.modified_files(payload) ⇒ Object
14
15
16
|
# File 'lib/txgh-server/webhooks/gitlab/push_attributes.rb', line 14
def modified_files(payload)
(payload, 'modified')
end
|
.repo_name(payload) ⇒ Object
6
7
8
|
# File 'lib/txgh-server/webhooks/gitlab/push_attributes.rb', line 6
def repo_name(payload)
payload.fetch('project', {})['path_with_namespace']
end
|