Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update copyright for NuGet Gallery #5278

Merged
merged 4 commits into from
Jan 17, 2018
Merged

Update copyright for NuGet Gallery #5278

merged 4 commits into from
Jan 17, 2018

Conversation

shishirx34
Copy link
Contributor

@shishirx34 shishirx34 commented Jan 17, 2018

Added support to update date dynamically from the app for the formatted branding message. Sending config updates to NuGet Deployment.
Fixes #5233


set
{
_ExternalBrandingMessage = string.Format(value, DateTime.Now.Year);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DateTime.UtcNow - better than guessing what timezone the server is running under

@@ -279,7 +281,16 @@ public class AppConfiguration : IAppConfiguration
/// <summary>
/// Gets/sets a string that is brand string to display in the footer
/// </summary>
public string ExternalBrandingMessage { get; set; }
public string ExternalBrandingMessage {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally feel that config classes should be as dumb as possible. Could we perhaps make this a view concern (do it in .cshtml)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we should add XML docs stating that this accepts a single {0} string format token which is replaced with the UTC year.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several places where the branding string is being checked for existence and assignment. I personally feel doing it once at the source of the truth is perhaps better, so that if/when we drag this along to another view we do not miss it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fine!

Copy link
Member

@joelverhagen joelverhagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit test then :shipit:

@shishirx34 shishirx34 merged commit ea802a5 into dev Jan 17, 2018
@shishirx34 shishirx34 deleted the update-copyright branch January 17, 2018 18:12
@shishirx34 shishirx34 mentioned this pull request Jan 17, 2018
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants