Skip to content

Commit

Permalink
github_owner
Browse files Browse the repository at this point in the history
  • Loading branch information
bestia.dev committed May 1, 2024
1 parent 64f91b7 commit 4bd0d18
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions automation_tasks_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ fn task_github_new_release() {
// take care of tags
let tag_name_version = cl::git_tag_sync_check_create_push(&version);

let owner = cargo_toml.github_owner().unwrap();
let github_owner = cargo_toml.github_owner().unwrap();
let repo_name = cargo_toml.package_name();
let now_date = cl::now_utc_date_iso();
let release_name = format!("Version {} ({})", &version, now_date);
Expand All @@ -435,7 +435,7 @@ fn task_github_new_release() {
let body_md_text = cl::body_text_from_releases_md().unwrap();

let github_client = github_mod::GitHubClient::new_with_stored_secret_token();
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&owner, &repo_name, &tag_name_version, &release_name, branch, &body_md_text));
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&github_owner, &repo_name, &tag_name_version, &release_name, branch, &body_md_text));
// early exit on error
if let Some(error_message) = json_value.get("message") {
eprintln!("{RED}{error_message}{RESET}");
Expand Down Expand Up @@ -477,7 +477,7 @@ fn task_github_new_release() {
.run().unwrap_or_else(|e| panic!("{e}"));

// upload asset
cgl::github_api_upload_asset_to_release(&github_client, &owner, &repo_name, &release_id, &tar_name);
cgl::github_api_upload_asset_to_release(&github_client, &github_owner, &repo_name, &release_id, &tar_name);

cl::ShellCommandLimitedDoubleQuotesSanitizer::new(
r#"rm "{tar_name_sanitized_for_double_quote}" "#).unwrap_or_else(|e| panic!("{e}"))
Expand All @@ -494,7 +494,7 @@ fn task_github_new_release() {

println!(
r#"
{GREEN}https://github.com/{owner}/{repo_name}/releases{RESET}
{GREEN}https://github.com/{github_owner}/{repo_name}/releases{RESET}
"#
);
}
Expand Down
8 changes: 4 additions & 4 deletions docs/src/cargo_auto_local_lib/template_new_auto_mod.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ <h2>Files</h2>
// take care of tags
let tag_name_version = cl::git_tag_sync_check_create_push(&amp;version);

let owner = cargo_toml.github_owner().unwrap();
let github_owner = cargo_toml.github_owner().unwrap();
let repo_name = cargo_toml.package_name();
let now_date = cl::now_utc_date_iso();
let release_name = format!("Version {} ({})", &amp;version, now_date);
Expand All @@ -2003,7 +2003,7 @@ <h2>Files</h2>
let body_md_text = cl::body_text_from_releases_md().unwrap();

let github_client = github_mod::GitHubClient::new_with_stored_secret_token();
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&amp;owner, &amp;repo_name, &amp;tag_name_version, &amp;release_name, branch, &amp;body_md_text));
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&amp;github_owner, &amp;repo_name, &amp;tag_name_version, &amp;release_name, branch, &amp;body_md_text));
// early exit on error
if let Some(error_message) = json_value.get("message") {
eprintln!("{RED}{error_message}{RESET}");
Expand Down Expand Up @@ -2045,7 +2045,7 @@ <h2>Files</h2>
.run().unwrap_or_else(|e| panic!("{e}"));

// upload asset
cgl::github_api_upload_asset_to_release(&amp;github_client, &amp;owner, &amp;repo_name, &amp;release_id, &amp;tar_name);
cgl::github_api_upload_asset_to_release(&amp;github_client, &amp;github_owner, &amp;repo_name, &amp;release_id, &amp;tar_name);

cl::ShellCommandLimitedDoubleQuotesSanitizer::new(
r#"rm "{tar_name_sanitized_for_double_quote}" "#).unwrap_or_else(|e| panic!("{e}"))
Expand All @@ -2062,7 +2062,7 @@ <h2>Files</h2>

println!(
r#"
{GREEN}https://github.com/{owner}/{repo_name}/releases{RESET}
{GREEN}https://github.com/{github_owner}/{repo_name}/releases{RESET}
"#
);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/cargo_auto_local_lib/template_new_cli_mod.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ <h2>Files</h2>
}
<span class="kw">if </span>github_owner_or_organization.is_none() {
<span class="macro">println!</span>(<span class=
"string">"{RED}Error: Github owner argument is missing: `cargo auto new_cli project_name github_owner_or_organization`{RESET}"</span>);
"string">"{RED}Error: Github github_owner argument is missing: `cargo auto new_cli project_name github_owner_or_organization`{RESET}"</span>);
<span class="kw">return</span>;
}
<span class="kw">let </span>rust_project_name = rust_project_name.unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ <h2>Files</h2>
}
<span class="kw">if </span>github_owner_or_organization.is_none() {
<span class="macro">println!</span>(<span class=
"string">"{RED}Error: Github owner or Organization argument is missing: `cargo auto new_pwa_wasm project_name github_owner_or_organization web_server server_username`{RESET}"</span>);
"string">"{RED}Error: Github github_owner or Organization argument is missing: `cargo auto new_pwa_wasm project_name github_owner_or_organization web_server server_username`{RESET}"</span>);
<span class="kw">return</span>;
}
<span class="kw">if </span>web_server_domain.is_none() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h2>Files</h2>
}
<span class="kw">if </span>github_owner_or_organization.is_none() {
<span class="macro">println!</span>(<span class=
"string">"{RED}Error: Github owner or Organization argument is missing: `cargo auto new_wasm project_name github_owner_or_organization web_server server_username`{RESET}"</span>);
"string">"{RED}Error: Github github_owner or Organization argument is missing: `cargo auto new_wasm project_name github_owner_or_organization web_server server_username`{RESET}"</span>);
<span class="kw">return</span>;
}
<span class="kw">if </span>web_server_domain.is_none() {
Expand Down
2 changes: 1 addition & 1 deletion docs/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
"Licensor" shall mean the copyright github_owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
Expand Down
8 changes: 4 additions & 4 deletions src/template_new_auto_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ fn task_github_new_release() {
// take care of tags
let tag_name_version = cl::git_tag_sync_check_create_push(&version);
let owner = cargo_toml.github_owner().unwrap();
let github_owner = cargo_toml.github_owner().unwrap();
let repo_name = cargo_toml.package_name();
let now_date = cl::now_utc_date_iso();
let release_name = format!("Version {} ({})", &version, now_date);
Expand All @@ -486,7 +486,7 @@ fn task_github_new_release() {
let body_md_text = cl::body_text_from_releases_md().unwrap();
let github_client = github_mod::GitHubClient::new_with_stored_secret_token();
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&owner, &repo_name, &tag_name_version, &release_name, branch, &body_md_text));
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&github_owner, &repo_name, &tag_name_version, &release_name, branch, &body_md_text));
// early exit on error
if let Some(error_message) = json_value.get("message") {
eprintln!("{RED}{error_message}{RESET}");
Expand Down Expand Up @@ -528,7 +528,7 @@ fn task_github_new_release() {
.run().unwrap_or_else(|e| panic!("{e}"));
// upload asset
cgl::github_api_upload_asset_to_release(&github_client, &owner, &repo_name, &release_id, &tar_name);
cgl::github_api_upload_asset_to_release(&github_client, &github_owner, &repo_name, &release_id, &tar_name);
cl::ShellCommandLimitedDoubleQuotesSanitizer::new(
r#"rm "{tar_name_sanitized_for_double_quote}" "#).unwrap_or_else(|e| panic!("{e}"))
Expand All @@ -545,7 +545,7 @@ fn task_github_new_release() {
println!(
r#"
{GREEN}https://github.com/{owner}/{repo_name}/releases{RESET}
{GREEN}https://github.com/{github_owner}/{repo_name}/releases{RESET}
"#
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/template_new_cli_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn new_cli(rust_project_name: Option<String>, github_owner_or_organization:
return;
}
if github_owner_or_organization.is_none() {
println!("{RED}Error: Github owner argument is missing: `cargo auto new_cli project_name github_owner_or_organization`{RESET}");
println!("{RED}Error: github_owner argument is missing: `cargo auto new_cli project_name github_owner_or_organization`{RESET}");
return;
}
let rust_project_name = rust_project_name.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/template_new_pwa_wasm_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn new_pwa_wasm(rust_project_name: Option<String>, github_owner_or_organizat
return;
}
if github_owner_or_organization.is_none() {
println!("{RED}Error: Github owner or Organization argument is missing: `cargo auto new_pwa_wasm project_name github_owner_or_organization web_server server_username`{RESET}");
println!("{RED}Error: github_owner or Organization argument is missing: `cargo auto new_pwa_wasm project_name github_owner_or_organization web_server server_username`{RESET}");
return;
}
if web_server_domain.is_none() {
Expand Down
2 changes: 1 addition & 1 deletion src/template_new_wasm_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn new_wasm(rust_project_name: Option<String>, github_owner_or_organization:
return;
}
if github_owner_or_organization.is_none() {
println!("{RED}Error: Github owner or Organization argument is missing: `cargo auto new_wasm project_name github_owner_or_organization web_server server_username`{RESET}");
println!("{RED}Error: github_owner or Organization argument is missing: `cargo auto new_wasm project_name github_owner_or_organization web_server server_username`{RESET}");
return;
}
if web_server_domain.is_none() {
Expand Down
8 changes: 4 additions & 4 deletions template_new_auto/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ fn task_github_new_release() {
// take care of tags
let tag_name_version = cl::git_tag_sync_check_create_push(&version);

let owner = cargo_toml.github_owner().unwrap();
let github_owner = cargo_toml.github_owner().unwrap();
let repo_name = cargo_toml.package_name();
let now_date = cl::now_utc_date_iso();
let release_name = format!("Version {} ({})", &version, now_date);
Expand All @@ -399,7 +399,7 @@ fn task_github_new_release() {
let body_md_text = cl::body_text_from_releases_md().unwrap();

let github_client = github_mod::GitHubClient::new_with_stored_secret_token();
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&owner, &repo_name, &tag_name_version, &release_name, branch, &body_md_text));
let json_value = github_client.send_to_github_api(cgl::github_api_create_new_release(&github_owner, &repo_name, &tag_name_version, &release_name, branch, &body_md_text));
// early exit on error
if let Some(error_message) = json_value.get("message") {
eprintln!("{RED}{error_message}{RESET}");
Expand Down Expand Up @@ -441,7 +441,7 @@ fn task_github_new_release() {
.run().unwrap_or_else(|e| panic!("{e}"));

// upload asset
cgl::github_api_upload_asset_to_release(&github_client, &owner, &repo_name, &release_id, &tar_name);
cgl::github_api_upload_asset_to_release(&github_client, &github_owner, &repo_name, &release_id, &tar_name);

cl::ShellCommandLimitedDoubleQuotesSanitizer::new(
r#"rm "{tar_name_sanitized_for_double_quote}" "#).unwrap_or_else(|e| panic!("{e}"))
Expand All @@ -458,7 +458,7 @@ fn task_github_new_release() {

println!(
r#"
{GREEN}https://github.com/{owner}/{repo_name}/releases{RESET}
{GREEN}https://github.com/{github_owner}/{repo_name}/releases{RESET}
"#
);
}
Expand Down

0 comments on commit 4bd0d18

Please sign in to comment.