WIP: interface und documentation

This commit is contained in:
Patrick 2024-07-18 12:31:14 +02:00
parent e7125bb7b2
commit 54d47f277d
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
3 changed files with 5 additions and 12 deletions

6
README
View file

@ -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

View file

@ -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<Tree>,
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<S>(_request: Request<S>) -> http_types::Result<Response> {
let mut status = 200;
let mut page = PageTemplate {
source_url: CONFIG.source_url.clone(),
..Default::default()
};
@ -256,7 +251,6 @@ async fn unsubscribe<S>(request: Request<S>) -> http_types::Result<Response> {
async fn handle_request<S>(request: Request<S>) -> http_types::Result<Response> {
let mut status = 200;
let mut page = PageTemplate {
source_url: CONFIG.source_url.clone(),
..Default::default()
};

View file

@ -236,9 +236,10 @@
{% endmatch %}
<footer>
<p>By <a href="https://alyssa.is/">Alyssa Ross</a></p>
<p>By <a href="https://blog.lel.lol/">Patrick</a></p>
<p>Based upon the works of <a href="https://alyssa.is/">Alyssa Ross</a></p>
<p><a href="{{ source_url }}">Source code</a></p>
<p><a href="https://forge.lel.lol/patrick/pr-tracker">Source code</a></p>
</footer>
</body>