Skip to content

Commit 04f2d14

Browse files
authored
Update app.rb
1 parent c68bee9 commit 04f2d14

File tree

1 file changed

+3
-3
lines changed
  • hooks/ruby/delete-repository-event

1 file changed

+3
-3
lines changed

hooks/ruby/delete-repository-event/app.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
enable :logging
1717
github_api_token = ENV['GITHUB_API_TOKEN']
1818
github_notification_repository = ENV['GITHUB_NOTIFICATION_REPOSITORY']
19-
github_host_url = ENV['GITHUB_HOST']
20-
github_api_endpoint = "https://#{github_host_url}/api/v3"
19+
github_host_fqdn = ENV['GITHUB_HOST']
20+
github_api_endpoint = "https://#{github_host_fqdn}/api/v3"
2121

2222
Octokit.configure do |c|
2323
c.api_endpoint = github_api_endpoint
@@ -42,7 +42,7 @@
4242
if action == 'deleted'
4343
# create a new issue in the repository configured above
4444
full_name = parsed['repository']['full_name']
45-
purgatory_link = "https://#{github_host_url}/stafftools/users/#{parsed['repository']['owner']['login']}/purgatory"
45+
purgatory_link = "https://#{github_host_fqdn}/stafftools/users/#{parsed['repository']['owner']['login']}/purgatory"
4646
client = Octokit::Client.new
4747
client.create_issue(github_notification_repository, "Repository deleted: #{full_name}", "[Restore the repository](#{purgatory_link})\n```json\n#{JSON.pretty_generate(parsed)}\n```")
4848

0 commit comments

Comments
 (0)