Skip to content

Commit d16b546

Browse files
committed
Add debug logging of team and repo diffs during actual sync
To help observe the progress better when real synces are being performed.
1 parent 5b4de53 commit d16b546

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
ZULIP_API_TOKEN: ${{ secrets.ZULIP_API_TOKEN }}
9898
ZULIP_USERNAME: ${{ secrets.ZULIP_USERNAME }}
9999
run: |
100-
cargo run sync apply --team-json build
100+
RUST_LOG="sync_team=debug" cargo run sync apply --team-json build
101101
102102
- name: Disable Jekyll
103103
run: touch build/.nojekyll

sync-team/src/github/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ impl SyncGitHub {
135135
}
136136

137137
fn diff_team(&self, github_team: &rust_team_data::v1::GitHubTeam) -> anyhow::Result<TeamDiff> {
138+
debug!("Diffing team `{}/{}`", github_team.org, github_team.name);
139+
138140
// Ensure the team exists and is consistent
139141
let team = match self.github.team(&github_team.org, &github_team.name)? {
140142
Some(team) => team,
@@ -234,6 +236,11 @@ impl SyncGitHub {
234236
}
235237

236238
fn diff_repo(&self, expected_repo: &rust_team_data::v1::Repo) -> anyhow::Result<RepoDiff> {
239+
debug!(
240+
"Diffing repo `{}/{}`",
241+
expected_repo.org, expected_repo.name
242+
);
243+
237244
let actual_repo = match self.github.repo(&expected_repo.org, &expected_repo.name)? {
238245
Some(r) => r,
239246
None => {

0 commit comments

Comments
 (0)