Skip to content

Commit d9f0b40

Browse files
committed
Add logging for cargo PR milestone.
1 parent 0b24251 commit d9f0b40

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/handlers/milestone_prs.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ async fn milestone_cargo(
124124

125125
// Get all of the git commits in the cargo repo.
126126
let cargo_repo = gh.repository("rust-lang/cargo").await?;
127+
log::info!("loading cargo changes {cargo_start_hash}...{cargo_end_hash}");
127128
let commits = cargo_repo
128129
.commits_in_range(gh, cargo_start_hash, cargo_end_hash)
129130
.await?;
@@ -141,6 +142,11 @@ async fn milestone_cargo(
141142
let merge_re = Regex::new("(?:Auto merge of|Merge pull request) #([0-9]+)").unwrap();
142143

143144
let pr_nums = commits.iter().filter_map(|commit| {
145+
log::info!(
146+
"getting PR number for cargo commit {} (len={})",
147+
commit.sha,
148+
commit.commit.message.len()
149+
);
144150
merge_re.captures(&commit.commit.message).map(|cap| {
145151
cap.get(1)
146152
.unwrap()
@@ -153,6 +159,7 @@ async fn milestone_cargo(
153159
.get_or_create_milestone(gh, release_version, "closed")
154160
.await?;
155161
for pr_num in pr_nums {
162+
log::info!("setting cargo milestone {milestone:?} for {pr_num}");
156163
cargo_repo.set_milestone(gh, &milestone, pr_num).await?;
157164
}
158165

0 commit comments

Comments
 (0)