We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19bc900 commit c69d2a7Copy full SHA for c69d2a7
lib/hooks/app/api.rb
@@ -108,6 +108,8 @@ def parse_payload(raw_body, headers)
108
# Load handler class
109
def load_handler(handler_class_name, handler_dir)
110
# Convert class name to file name (e.g., Team1Handler -> team1_handler.rb)
111
+ # E.g.2: GithubHandler -> github_handler.rb
112
+ # E.g.3: GitHubHandler -> git_hub_handler.rb
113
file_name = handler_class_name.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, "") + ".rb"
114
file_path = File.join(handler_dir, file_name)
115
0 commit comments