Skip to content

Commit

Permalink
Rename id to node_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Mar 18, 2024
1 parent ac6d697 commit c13a693
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/github/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/github/api/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions src/github/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c13a693

Please sign in to comment.