Skip to content

Commit e093ff3

Browse files
committed
Change the script paths
1 parent ef09ebb commit e093ff3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

cgi-bin/webhook.cgi

+9-9
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class PushHook
143143
def process(repository:, ref:, before:, after:, pusher:)
144144
case repository
145145
when 'ruby/git.ruby-lang.org'
146-
on_push_ruby_commit_hook(ref)
146+
on_push_git_ruby_lang_org(ref)
147147
when 'ruby/ruby'
148148
on_push_ruby(ref, pusher: pusher)
149149
when *DEFAULT_GEM_REPOS
@@ -157,28 +157,28 @@ class PushHook
157157

158158
attr_reader :logger
159159

160-
def on_push_ruby_commit_hook(ref)
160+
def on_push_git_ruby_lang_org(ref)
161161
if ref == 'refs/heads/master'
162-
# www-data user is allowed to sudo `/home/git/ruby-commit-hook/bin/update-ruby-commit-hook.sh`.
163-
execute('/home/git/ruby-commit-hook/bin/update-ruby-commit-hook.sh', user: 'git')
162+
# www-data user is allowed to sudo `/home/git/git.ruby-lang.org/bin/update-ruby-commit-hook.sh`.
163+
execute('/home/git/git.ruby-lang.org/bin/update-ruby-commit-hook.sh', user: 'git')
164164
else
165-
logger.info("skipped ruby-commit-hook ref: #{ref}")
165+
logger.info("skipped git.ruby-lang.org ref: #{ref}")
166166
end
167167
end
168168

169169
def on_push_ruby(ref, pusher:)
170170
if RUBY_SYNCED_REFS.include?(ref) && pusher != 'matzbot' # matzbot should stop an infinite loop here.
171-
# www-data user is allowed to sudo `/home/git/ruby-commit-hook/bin/update-ruby.sh`.
172-
execute('/home/git/ruby-commit-hook/bin/update-ruby.sh', File.basename(ref), user: 'git')
171+
# www-data user is allowed to sudo `/home/git/git.ruby-lang.org/bin/update-ruby.sh`.
172+
execute('/home/git/git.ruby-lang.org/bin/update-ruby.sh', File.basename(ref), user: 'git')
173173
else
174174
logger.info("skipped ruby ref: #{ref} (pusher: #{pusher})")
175175
end
176176
end
177177

178178
def on_push_default_gem(ref, repository:, before:, after:)
179179
if ref == 'refs/heads/master'
180-
# www-data user is allowed to sudo `/home/git/ruby-commit-hook/bin/update-default-gem.sh`.
181-
execute('/home/git/ruby-commit-hook/bin/update-default-gem.sh', *repository.split('/', 2), before, after, user: 'git')
180+
# www-data user is allowed to sudo `/home/git/git.ruby-lang.org/bin/update-default-gem.sh`.
181+
execute('/home/git/git.ruby-lang.org/bin/update-default-gem.sh', *repository.split('/', 2), before, after, user: 'git')
182182
else
183183
logger.info("skipped #{repository} ref: #{ref}")
184184
end

0 commit comments

Comments
 (0)