From 54d47f277df81bfe82339ec3d2ceabd9c371aa91 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 18 Jul 2024 12:31:14 +0200 Subject: [PATCH] WIP: interface und documentation --- README | 6 ++---- src/main.rs | 6 ------ templates/page.html | 5 +++-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/README b/README index 88d9336..fa86857 100644 --- a/README +++ b/README @@ -31,9 +31,8 @@ Usage The program must be supplied with a local checkout of the monitored git repository, the remote name in the repository corresponding to -upstream Nixpkgs, a User-Agent string to use when contacting the -GitHub API, and a URL where users can download the program's source -code. Optionally, a "mount" path can be specified, which will be +upstream Nixpkgs and a User-Agent string to use when contacting the +GitHub API. Optionally, a "mount" path can be specified, which will be prefixed to all of the server's routes, so that it can be served at a non-root HTTP path. @@ -43,7 +42,6 @@ For example: --path /var/lib/nixpkgs.git \ --remote nixpkgs \ --user-agent 'pr-tracker (alyssais)' \ - --source-url https://example.com/pr-tracker.tar.gz \ --mount pr-tracker Additionally, a GitHub API token should be supplied on pr-tracker's diff --git a/src/main.rs b/src/main.rs index ea3c0bf..1130654 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,9 +50,6 @@ pub struct Config { #[arg(long)] user_agent: OsString, - #[arg(long)] - source_url: String, - #[arg(long, default_value = "/")] mount: String, @@ -110,7 +107,6 @@ struct PageTemplate { closed: bool, subscribed: bool, tree: Option, - source_url: String, } #[derive(Debug, Deserialize)] @@ -172,7 +168,6 @@ async fn track_pr(pr_number: String, status: &mut u16, page: &mut PageTemplate) async fn update_subscribers(_request: Request) -> http_types::Result { let mut status = 200; let mut page = PageTemplate { - source_url: CONFIG.source_url.clone(), ..Default::default() }; @@ -256,7 +251,6 @@ async fn unsubscribe(request: Request) -> http_types::Result { async fn handle_request(request: Request) -> http_types::Result { let mut status = 200; let mut page = PageTemplate { - source_url: CONFIG.source_url.clone(), ..Default::default() }; diff --git a/templates/page.html b/templates/page.html index 08212e1..cf552ed 100644 --- a/templates/page.html +++ b/templates/page.html @@ -236,9 +236,10 @@ {% endmatch %}