Skip to content

Commit a2ae093

Browse files
Fix finding the git commit message
Previously we were looking for a non-existent field, which meant that the PR number parsing was always failing.
1 parent 85e27d1 commit a2ae093

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/github.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1455,15 +1455,14 @@ impl GithubClient {
14551455
#[derive(Debug, serde::Deserialize)]
14561456
pub struct GithubCommit {
14571457
pub sha: String,
1458-
#[serde(default)]
1459-
pub message: String,
14601458
pub commit: GitCommit,
14611459
pub parents: Vec<Parent>,
14621460
}
14631461

14641462
#[derive(Debug, serde::Deserialize)]
14651463
pub struct GitCommit {
14661464
pub author: GitUser,
1465+
pub message: String,
14671466
}
14681467

14691468
#[derive(Debug, serde::Deserialize)]

src/handlers/rustc_commits.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async fn synchronize_commits(ctx: &Context, sha: &str, pr: u32) {
100100
let parent_sha = gc.parents.remove(0).sha;
101101

102102
if pr.is_none() {
103-
if let Some(tail) = gc.message.strip_prefix("Auto merge of #") {
103+
if let Some(tail) = gc.commit.message.strip_prefix("Auto merge of #") {
104104
if let Some(end) = tail.find(' ') {
105105
if let Ok(number) = tail[..end].parse::<u32>() {
106106
pr = Some(number);

0 commit comments

Comments
 (0)