Skip to content

Commit

Permalink
Use unused GitHub values
Browse files Browse the repository at this point in the history
  • Loading branch information
russellbanks committed Oct 30, 2024
1 parent 32dd022 commit 2840603
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/github/github_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,6 @@ impl GitHub {
Ok(GitHubValues {
publisher_url: PublisherUrl::from_str(repository.owner.url.as_str())?,
publisher_support_url,
short_description: repository.description.unwrap_or_default(),
license: repository
.license_info
.and_then(|mut info| {
Expand Down Expand Up @@ -831,7 +830,6 @@ pub struct Manifests {
pub struct GitHubValues {
pub publisher_url: PublisherUrl,
pub publisher_support_url: Option<PublisherSupportUrl>,
pub short_description: String,
pub license: Option<License>,
pub license_url: Option<LicenseUrl>,
pub package_url: PackageUrl,
Expand Down
2 changes: 0 additions & 2 deletions src/github/graphql/get_all_values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub struct GetAllValues {
#[derive(cynic::QueryFragment)]
#[cynic(variables = "GetAllValuesVariables")]
pub struct Repository {
pub description: Option<String>,
pub has_issues_enabled: bool,
pub license_info: Option<License>,
pub owner: RepositoryOwner,
Expand Down Expand Up @@ -105,7 +104,6 @@ mod tests {
const GET_ALL_VALUES_QUERY: &str = indoc! {r#"
query GetAllValues($owner: String!, $name: String!, $tagName: String!) {
repository(owner: $owner, name: $name) {
description
hasIssuesEnabled
licenseInfo {
key
Expand Down
5 changes: 5 additions & 0 deletions src/manifests/default_locale_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ impl DefaultLocaleManifest {
.as_mut()
.and_then(|values| values.publisher_support_url.take());
}
if self.package_url.is_none() {
self.package_url = github_values
.as_ref()
.map(|values| values.package_url.clone());
}
if let Some(github_license) = github_values
.as_mut()
.and_then(|values| values.license.take())
Expand Down

0 comments on commit 2840603

Please sign in to comment.