diff --git a/src/github/api/mod.rs b/src/github/api/mod.rs index 61f3c61..bf85349 100644 --- a/src/github/api/mod.rs +++ b/src/github/api/mod.rs @@ -262,8 +262,7 @@ pub(crate) struct RepoAppInstallation { #[derive(serde::Deserialize, Debug)] pub(crate) struct Repo { - #[serde(rename = "node_id")] - pub(crate) id: String, + pub(crate) node_id: String, #[serde(rename = "id")] pub(crate) repo_id: u64, pub(crate) name: String, diff --git a/src/github/api/write.rs b/src/github/api/write.rs index c93fd06..03e9090 100644 --- a/src/github/api/write.rs +++ b/src/github/api/write.rs @@ -230,7 +230,7 @@ impl GitHubWrite { debug!("Creating the repo {org}/{name} with {req:?}"); if self.dry_run { Ok(Repo { - id: String::from("ID"), + node_id: String::from("ID"), repo_id: 0, name: name.to_string(), org: org.to_string(), diff --git a/src/github/mod.rs b/src/github/mod.rs index b1ae33d..547a496 100644 --- a/src/github/mod.rs +++ b/src/github/mod.rs @@ -337,7 +337,7 @@ impl SyncGitHub { Ok(RepoDiff::Update(UpdateRepoDiff { org: expected_repo.org.clone(), name: actual_repo.name, - repo_node_id: actual_repo.id, + repo_node_id: actual_repo.node_id, settings_diff: (old_settings, new_settings), permission_diffs, branch_protection_diffs, @@ -699,7 +699,7 @@ impl CreateRepoDiff { pattern: branch.clone(), operation: BranchProtectionDiffOperation::Create(protection.clone()), } - .apply(sync, &self.org, &self.name, &repo.id)?; + .apply(sync, &self.org, &self.name, &repo.node_id)?; } for installation in &self.app_installations {