Skip to content

Commit 795fd8b

Browse files
committed
Do not update proj name for GH projects #20
1 parent d8cd40d commit 795fd8b

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

stackmuncher_lib/src/report.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ pub struct Report {
2525
/// Only used for Inbox reports.
2626
#[serde(skip_serializing_if = "Option::is_none")]
2727
pub primary_email: Option<String>,
28-
/// Member's public name. No update is needed if None. Clear if Some("").
29-
/// Only used for Inbox reports.
30-
#[serde(skip_serializing_if = "Option::is_none")]
31-
pub public_name: Option<String>,
32-
/// Member's public contact. No update is needed if None. Clear if Some("").
33-
/// Can contain any details, up to the member.
34-
/// Only used for Inbox reports.
35-
#[serde(skip_serializing_if = "Option::is_none")]
36-
pub public_contact: Option<String>,
3728
/// GitHub user name, if known
3829
#[serde(skip_serializing_if = "Option::is_none")]
3930
pub github_user_name: Option<String>,
@@ -257,8 +248,6 @@ impl Report {
257248
// copy the dev identity if the other report is newer by its timestamp
258249
if other_report.timestamp > merge_into_inner.timestamp {
259250
merge_into_inner.primary_email = other_report.primary_email;
260-
merge_into_inner.public_name = other_report.public_name;
261-
merge_into_inner.public_contact = other_report.public_contact;
262251
}
263252
}
264253

@@ -510,8 +499,6 @@ impl Report {
510499
last_contributor_commit_date_epoch: None,
511500
last_contributor_commit_sha1: None,
512501
primary_email: None,
513-
public_contact: None,
514-
public_name: None,
515502
first_contributor_commit_sha1: None,
516503
first_contributor_commit_date_iso: None,
517504
first_contributor_commit_date_epoch: None,

stackmuncher_lib/src/report_brief.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,14 @@ impl super::report::Report {
174174
})
175175
.collect::<HashSet<TechOverview>>();
176176

177+
// use GitHub's project name if it exists, otherwise make one up
178+
let project_name = match &self.github_repo_name {
179+
Some(v) => v.clone(),
180+
None => project_name_from_date(&self.date_init),
181+
};
182+
177183
ProjectReportOverview {
178-
project_name: project_name_from_date(&self.date_init),
184+
project_name,
179185
project_id: self.project_id.clone(),
180186
owner_id: self.owner_id.clone(),
181187
github_repo_name: self.github_repo_name.clone(),

0 commit comments

Comments
 (0)