From 7c1078e49cb3281352b332039498d74267ab527c Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Tue, 21 Apr 2026 13:26:14 +0200 Subject: [PATCH] compliance: Temporarily fix the wrong compliance reports (#54401) This will be fully replaced by https://github.com/zed-industries/zed/pull/54342 - however, this will not help for the next week on the stable branch, since we have plenty of non-signed commits on that branch currently. Thus, adding this temporary check here to fix this and which is a cherry-pickable change. This **will** be fully replaced by the linked PR, however, I cannot cherry pick that since we would otherwise need to force-push the branches to remove the bad commits. Release Notes: - N/A --- tooling/compliance/src/checks.rs | 6 +++++- tooling/compliance/src/git.rs | 4 ++++ tooling/compliance/src/github.rs | 10 +++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tooling/compliance/src/checks.rs b/tooling/compliance/src/checks.rs index 409df5394f18176139ba49a882c5754f3fa46711..8db325d75b0c86c50f9935cdef3e13b2a1a27c47 100644 --- a/tooling/compliance/src/checks.rs +++ b/tooling/compliance/src/checks.rs @@ -6,7 +6,7 @@ use crate::{ git::{CommitDetails, CommitList}, github::{ CommitAuthor, GithubApiClient, GithubLogin, PullRequestComment, PullRequestData, - PullRequestReview, Repository, ReviewState, + PullRequestReview, Repository, ReviewState, ZED_ZIPPY_AUTHOR, }, report::Report, }; @@ -115,6 +115,10 @@ impl Reporter { commit: &CommitDetails, ) -> Result { let Some(pr_number) = commit.pr_number() else { + if commit.author().name().contains("Zed Zippy") && commit.title().starts_with("Bump to") + { + return Ok(ReviewSuccess::CoAuthored(vec![ZED_ZIPPY_AUTHOR.clone()])); + } return Err(ReviewFailure::NoPullRequestFound); }; diff --git a/tooling/compliance/src/git.rs b/tooling/compliance/src/git.rs index f5b1a9c32960215aee4f0f1380fc41086667bba3..eb26f3540618317a38a7bbea2f9734b4b88da8f9 100644 --- a/tooling/compliance/src/git.rs +++ b/tooling/compliance/src/git.rs @@ -163,6 +163,10 @@ impl Committer { email: email.to_owned(), } } + + pub fn name(&self) -> &str { + &self.name + } } impl fmt::Display for Committer { diff --git a/tooling/compliance/src/github.rs b/tooling/compliance/src/github.rs index edd2e4ea2e702e4637299fa476514386d528894d..42c32592d088581d5f7e6db069e731637f7f86e0 100644 --- a/tooling/compliance/src/github.rs +++ b/tooling/compliance/src/github.rs @@ -1,4 +1,4 @@ -use std::{borrow::Cow, collections::HashMap, fmt, ops::Not}; +use std::{borrow::Cow, collections::HashMap, fmt, ops::Not, sync::LazyLock}; use anyhow::Result; use derive_more::Deref; @@ -73,6 +73,14 @@ pub struct CommitAuthor { user: Option, } +pub(crate) static ZED_ZIPPY_AUTHOR: LazyLock = LazyLock::new(|| CommitAuthor { + name: "Zed Zippy".to_string(), + email: "234243425+zed-zippy[bot]@users.noreply.github.com".to_string(), + user: Some(GithubLogin { + login: "zed-zippy[bot]".to_string(), + }), +}); + impl CommitAuthor { pub(crate) fn user(&self) -> Option<&GithubLogin> { self.user.as_ref()