sources: add owner to RepositoryInfo

This commit is contained in:
2026-04-27 06:32:34 +09:00
parent 84c9f7b931
commit 970df2e8c2
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -77,6 +77,7 @@ pub enum RepositoryVisibility {
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct RepositoryInfo {
pub owner: String,
pub name: String,
pub url: String,
pub icon_url: Option<String>,
+3
View File
@@ -64,6 +64,7 @@ impl KagamiSource for KagamiSourceGitea {
for r in repos_resp.iter() {
let info = RepositoryInfo {
owner: r.owner.login.clone(),
name: r.name.clone(),
url: r.html_url.clone(),
icon_url: if r.avatar_url.is_empty() {
@@ -133,6 +134,7 @@ impl KagamiSource for KagamiSourceGitea {
for r in repos_resp.iter() {
let info = RepositoryInfo {
owner: r.owner.login.clone(),
name: r.name.clone(),
url: r.html_url.clone(),
icon_url: if r.avatar_url.is_empty() {
@@ -200,6 +202,7 @@ impl KagamiSource for KagamiSourceGitea {
for r in repos_resp.iter() {
let info = RepositoryInfo {
owner: r.owner.login.clone(),
name: r.name.clone(),
url: r.html_url.clone(),
icon_url: if r.avatar_url.is_empty() {
+1
View File
@@ -195,6 +195,7 @@ impl KagamiSource for KagamiSourceGithub {
fn map_github_repo_to_info(r: &models::Repository) -> RepositoryInfo {
RepositoryInfo {
owner: r.owner.as_ref().map(|o| o.login.clone()).unwrap(),
name: r.name.clone(),
// TODO: don't unwrap with string default here
url: r