Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some temporary trace lines #287

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions clowarden-core/src/services/github/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use octorust::types::{
use regex::Regex;
use serde::{Deserialize, Serialize};
use serde_json::json;
use tracing::trace;

use crate::{
cfg::Legacy,
Expand Down Expand Up @@ -147,11 +148,15 @@ impl State {
for team in stream::iter(svc.list_teams(ctx).await?)
.map(|team| async {
// Get maintainers and members (including pending invitations)
trace!(team = %team.slug, "getting team maintainers");
let mut maintainers: Vec<UserName> =
svc.list_team_maintainers(ctx, &team.slug).await?.into_iter().map(|u| u.login).collect();
trace!(team = %team.slug, "getting team members");
let mut members: Vec<UserName> =
svc.list_team_members(ctx, &team.slug).await?.into_iter().map(|u| u.login).collect();
trace!(team = %team.slug, "getting team invitations");
for invitation in svc.list_team_invitations(ctx, &team.slug).await? {
trace!(team = %team.slug, login = %invitation.login, "getting team membership");
let membership = svc.get_team_membership(ctx, &team.slug, &invitation.login).await?;
if membership.state == OrgMembershipState::Pending {
match membership.role {
Expand Down
2 changes: 1 addition & 1 deletion clowarden-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn main() -> Result<()> {

// Setup logging
if std::env::var_os("RUST_LOG").is_none() {
std::env::set_var("RUST_LOG", "clowarden=debug");
std::env::set_var("RUST_LOG", "clowarden=trace");
}
let ts = tracing_subscriber::fmt().with_env_filter(EnvFilter::from_default_env());
match cfg.log.format {
Expand Down
Loading