manager: Don't hardcode repository URL
This commit is contained in:
parent
d0c8389c3b
commit
24e834dde3
2 changed files with 19 additions and 9 deletions
|
|
@ -34,12 +34,13 @@ async fn run() -> anyhow::Result<()> {
|
|||
)
|
||||
.context("Failed parsing GITHUB_SERVER_URL as a url")?;
|
||||
|
||||
let mut repo_auth_url = server_url
|
||||
let repo_url = server_url
|
||||
.join(&format!(
|
||||
"{}/{}",
|
||||
meta.issue.repository.owner, meta.issue.repository.name
|
||||
))
|
||||
.unwrap();
|
||||
let mut repo_auth_url = repo_url.clone();
|
||||
repo_auth_url.set_username("forgejo-actions").unwrap();
|
||||
repo_auth_url.set_password(Some(&token)).unwrap();
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ async fn run() -> anyhow::Result<()> {
|
|||
.await
|
||||
.context("Failed to render and publish the techtree to git")?;
|
||||
|
||||
let mermaid = tree.to_mermaid();
|
||||
let mermaid = tree.to_mermaid(&repo_url.to_string());
|
||||
let wiki_text = format!(
|
||||
r##"This page is automatically updated to show the latest and greatest FAFO techtree:
|
||||
|
||||
|
|
@ -124,7 +125,7 @@ async fn run() -> anyhow::Result<()> {
|
|||
}
|
||||
};
|
||||
|
||||
let mermaid = subtree.to_mermaid();
|
||||
let mermaid = subtree.to_mermaid(&repo_url.to_string());
|
||||
|
||||
let full_text = format!(
|
||||
r##"## Partial Techtree
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue