remove: Remove --euc flag from patch send command and use the repo euc

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-06-30 11:11:25 +00:00
parent 55e5d86c03
commit 2874ba8457
3 changed files with 12 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
// along with this program. If not, see <https://gnu.org/licenses/gpl-3.0.html>.
use convert_case::{Case, Casing};
use nostr::hashes::sha1::Hash as Sha1Hash;
use nostr::{
event::{Event, EventBuilder, EventId, Kind, Tag, TagKind, TagStandard, Tags},
key::PublicKey,
@@ -215,6 +216,11 @@ impl Vec<GitRepositoryAnnouncement> {
pub fn extract_maintainers(&self) -> Vec<PublicKey> {
self.iter().flat_map(|r| r.maintainers.clone()).collect()
}
/// Gets the first EUC hash from the reposotoies if it exists.
pub fn extract_euc(&self) -> Option<&Sha1Hash> {
self.iter().find_map(|r| r.euc.as_ref())
}
}
/// Utility functions for working with patch events