Skip to content

Commit d9e9bcc

Browse files
committed
Drop default gem sync from webhook.cgi
https://bugs.ruby-lang.org/issues/21628
1 parent 013ab98 commit d9e9bcc

File tree

3 files changed

+0
-155
lines changed

3 files changed

+0
-155
lines changed

bin/notify-slack-failed-gem-update.rb

Lines changed: 0 additions & 28 deletions
This file was deleted.

bin/update-default-gem.sh

Lines changed: 0 additions & 51 deletions
This file was deleted.

cgi-bin/webhook.cgi

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -63,71 +63,6 @@ class Webhook
6363
end
6464

6565
class PushHook
66-
DEFAULT_GEM_REPOS = %w[
67-
benchmark
68-
cgi
69-
date
70-
delegate
71-
did_you_mean
72-
digest
73-
English
74-
erb
75-
error_highlight
76-
etc
77-
fcntl
78-
fileutils
79-
find
80-
forwardable
81-
io-console
82-
io-nonblock
83-
io-wait
84-
ipaddr
85-
irb
86-
logger
87-
net-http
88-
net-protocol
89-
open-uri
90-
open3
91-
openssl
92-
optparse
93-
ostruct
94-
pathname
95-
pp
96-
prettyprint
97-
prism
98-
pstore
99-
psych
100-
rdoc
101-
readline
102-
readline-ext
103-
reline
104-
resolv
105-
securerandom
106-
set
107-
shellwords
108-
singleton
109-
stringio
110-
syntax_suggest
111-
tempfile
112-
time
113-
timeout
114-
tmpdir
115-
tsort
116-
un
117-
uri
118-
weakref
119-
win32ole
120-
yaml
121-
zlib
122-
json
123-
win32-registry
124-
mmtk
125-
].map { |repo| "ruby/#{repo}" } + %w[
126-
rubygems/rubygems
127-
]
128-
# Set false to stop sync before a release
129-
DEFAULT_GEM_SYNC_ENABLED = true
130-
13166
def initialize(logger:)
13267
@logger = logger
13368
end
@@ -138,8 +73,6 @@ class PushHook
13873
on_push_git_ruby_lang_org(ref)
13974
when 'ruby/ruby'
14075
on_push_ruby(ref, pusher: pusher)
141-
when *DEFAULT_GEM_REPOS
142-
on_push_default_gem(ref, repository: repository, before: before, after: after)
14376
else
14477
logger.info("unexpected repository: #{repository}")
14578
end
@@ -168,15 +101,6 @@ class PushHook
168101
end
169102
end
170103

171-
def on_push_default_gem(ref, repository:, before:, after:)
172-
if ['refs/heads/master', 'refs/heads/main'].include?(ref) && DEFAULT_GEM_SYNC_ENABLED
173-
# www-data user is allowed to sudo `/home/git/git.ruby-lang.org/bin/update-default-gem.sh`.
174-
execute('/home/git/git.ruby-lang.org/bin/update-default-gem.sh', *repository.split('/', 2), before, after, user: 'git')
175-
else
176-
logger.info("skipped #{repository} ref: #{ref}")
177-
end
178-
end
179-
180104
def execute(*cmd, user:)
181105
cmd = ['/usr/bin/sudo', '-u', user, *cmd]
182106
logger.info("+ #{cmd.shelljoin}")

0 commit comments

Comments
 (0)