Skip to content

Commit

Permalink
Rename hook-url to web-url. It's not only hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbkr committed Nov 6, 2023
1 parent aaf820a commit 22f91f5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ projects:
slug: MoarVM/MoarVM
install-id: 20243470

hook-url: https://cibot.rakudo.org/
web-url: https://cibot.rakudo.org/
jwt-secret: "N#xTe4>IGSWfH#M&MYXxI~#w9yj@X8X/g8-N{;n)5D>kFh~AaW"

obs-user: some_user
Expand Down
8 changes: 4 additions & 4 deletions lib/Config.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Config {
has $.github-app-key-file;
has $.projects;

has $.hook-url;
has $.web-url;
has $.jwt-secret;

has $.obs-user;
Expand Down Expand Up @@ -85,8 +85,8 @@ class Config {
has $.log-level;

submethod TWEAK() {
unless $!hook-url.ends-with('/') {
$!hook-url ~= '/';
unless $!web-url.ends-with('/') {
$!web-url ~= '/';
}
}

Expand All @@ -104,7 +104,7 @@ class Config {
moar => ConfigProject.from-config(%config<projects><moar>),
),

hook-url => %config<hook-url>,
web-url => %config<web-url>,
jwt-secret => %config<jwt-secret>,

obs-user => %config<obs-user>,
Expand Down
2 changes: 1 addition & 1 deletion lib/GitHubCITestRequester.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ method process-worklist() is serial-dedup {
repo => %project-and-repo<repo>,
name => $test.name,
sha => $ts.commit-sha,
url => config.hook-url ~ "testset/" ~ $ts.id,
url => config.web-url ~ "testset/" ~ $ts.id,
id => $test.id,
started-at => DateTime.now,
status => $gh-status,
Expand Down
2 changes: 1 addition & 1 deletion lib/OBS.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ method process-worklist() is serial-dedup {
$spec ~~ s{ '<moar_rev>' } = $source-id;
$spec ~~ s{ '<nqp_rev>' } = $source-id;
$spec ~~ s{ '<rakudo_rev>' } = $source-id;
$spec ~~ s{ '<rcb_hook_url>' } = config.hook-url ~ $!hook-suffix ~ "?pts-id=" ~ $running-pts.id;
$spec ~~ s{ '<rcb_hook_url>' } = config.web-url ~ $!hook-suffix ~ "?pts-id=" ~ $running-pts.id;
$!interface.upload-file($package, $package ~ ".spec", :blob($spec));
my $dom = $!interface.commit($package);
}
Expand Down
8 changes: 4 additions & 4 deletions lib/RakudoCIBot.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ submethod TWEAK() {
client-secret => config.github-client-secret,
pem => $gh-pem,
processor => $!requester,
redirect-url => config.hook-url ~ "gh-oauth-callback",
redirect-url => config.web-url ~ "gh-oauth-callback",
;
$!requester.github-interface = $!github-interface;
$!testset-manager.register-status-listener($!requester);
Expand Down Expand Up @@ -140,9 +140,9 @@ method start() {
$http.start;

say "Listening at http://{config.web-host}:{config.web-port}";
say "GitHub Homepage URL: {config.hook-url}";
say "GitHub Callback URL: {config.hook-url}gh-oauth-callback";
say "GitHub Webhook URL: {config.hook-url}github-hook";
say "GitHub Homepage URL: {config.web-url}";
say "GitHub Callback URL: {config.web-url}gh-oauth-callback";
say "GitHub Webhook URL: {config.web-url}github-hook";
}

method stop() {
Expand Down
2 changes: 1 addition & 1 deletion t/data/config-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ projects:
repo-url: https://github.com/MoarVM/MoarVM.git
install-id: 20243470

hook-url: https://rcb-host.org/
web-url: https://rcb-host.org/

obs-user: someuser
obs-password: "some_password"
Expand Down

0 comments on commit 22f91f5

Please sign in to comment.