Skip to content

Commit 1477af4

Browse files
committed
Put event name back to installation
It seems GitHub is currently sending both apps events twice, under different names. When we get confirmation about the correct names from them, this is ready to merge.
1 parent d14a48e commit 1477af4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/travis/listener/app.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class App < Sinatra::Base
2323
create
2424
delete
2525
repository
26-
integration_installation
26+
installation
2727
installation_repositories
2828
]
2929

@@ -110,7 +110,7 @@ def github_pr_event?
110110

111111
def github_apps_event?
112112
[
113-
'integration_installation',
113+
'installation',
114114
'installation_repositories',
115115
].include? event_type
116116
end
@@ -138,7 +138,7 @@ def sync_event
138138
)
139139

140140
case event_type
141-
when 'integration_installation'
141+
when 'installation'
142142
Travis::Sidekiq::GithubSync.gh_app_install(data)
143143
when 'installation_repositories'
144144
Travis::Sidekiq::GithubSync.gh_app_repos(data)

spec/travis/events_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
before { create }
1515

1616
def create(opts = {})
17-
if ["integration_installation", "installation_repositories"].include? type
17+
if ["installation", "installation_repositories"].include? type
1818
params = payload
1919
else
2020
params = { :payload => (opts[:payload] || payload) }
@@ -90,9 +90,9 @@ def create(opts = {})
9090
include_examples 'queues gatekeeper event'
9191
end
9292

93-
describe 'an integration_installation event' do
94-
let(:type) { 'integration_installation' }
95-
let(:event) { 'integration_installation' }
93+
describe 'an installation event' do
94+
let(:type) { 'installation' }
95+
let(:event) { 'installation' }
9696

9797
it { expect(gh_sync_queue)
9898
.to have_received(:push)

0 commit comments

Comments
 (0)