feat: collect useful environment vars
All checks were successful
Test / test (push) Successful in 43s
All checks were successful
Test / test (push) Successful in 43s
This commit is contained in:
parent
f2511d6737
commit
307e463c87
1 changed files with 4 additions and 4 deletions
|
@ -3,9 +3,9 @@ use anyhow::Context;
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
println!("Forgejo TODO Checker!");
|
println!("Forgejo TODO Checker!");
|
||||||
|
|
||||||
let ci_repo = std::env::var("CI_REPO").context("CI_REPO")?;
|
let ci_repo = std::env::var("GITHUB_REPOSITORY").context("GITHUB_REPOSITORY")?;
|
||||||
let ci_repo_url = std::env::var("CI_REPO_URL").context("CI_REPO_URL")?;
|
let ci_server_url = std::env::var("GITHUB_SERVER_URL").context("GITHUB_SERVER_URL")?;
|
||||||
let ci_forge_type = std::env::var("CI_FORGE_TYPE").context("CI_FORGE_TYPE")?;
|
let ci_repo_url = format!("{ci_server_url}/{ci_repo}");
|
||||||
|
|
||||||
// optional arg for private repos
|
// optional arg for private repos
|
||||||
let repo_token = std::env::var("REPO_TOKEN").ok();
|
let repo_token = std::env::var("REPO_TOKEN").ok();
|
||||||
|
@ -16,7 +16,7 @@ fn main() -> anyhow::Result<()> {
|
||||||
let issue =
|
let issue =
|
||||||
regex::Regex::new(r"( |)(\(|\(#)(?P<ISSUE_NUMBER>\d+)(\))").context("issue regex")?;
|
regex::Regex::new(r"( |)(\(|\(#)(?P<ISSUE_NUMBER>\d+)(\))").context("issue regex")?;
|
||||||
|
|
||||||
println!("[ci_repo:{ci_repo}][ci_repo_url:{ci_repo_url}][ci_forge_type:{ci_forge_type}][repo_token:{repo_token:?}][prefix:{prefix}][issue:{issue}]");
|
println!("[ci_repo:{ci_repo}][ci_repo_url:{ci_repo_url}][repo_token:{repo_token:?}][prefix:{prefix}][issue:{issue}]");
|
||||||
|
|
||||||
// list files in current directory to get a feel for what we have access to
|
// list files in current directory to get a feel for what we have access to
|
||||||
std::fs::read_dir(".")?
|
std::fs::read_dir(".")?
|
||||||
|
|
Loading…
Reference in a new issue