-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(settings): missing fields in api conversion and func renames #1130
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1130 +/- ##
==========================================
- Coverage 68.08% 68.06% -0.02%
==========================================
Files 410 410
Lines 13691 13699 +8
==========================================
+ Hits 9321 9324 +3
- Misses 3836 3841 +5
Partials 534 534
|
ps.SetRepoAllowlist(_ps.GetRepoAllowlist()) | ||
ps.SetScheduleAllowlist(_ps.GetScheduleAllowlist()) | ||
|
||
ps.SetCreatedAt(_ps.GetCreatedAt()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created_at
shouldn't be updateable, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no but that raises a good point this function should really be called DuplicateInPlace
or something like that. i see the confusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or... Overwrite
or FromSettings
?
fwiw its used in these places:
https://github.com/go-vela/server/blob/main/cmd/vela-server/server.go#L255
https://github.com/go-vela/server/blob/main/api/admin/settings.go#L121-L122
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i made some tweaks and renamed Update
to FromSettings
…nto fix/platform-settings
…nto fix/settings-timestamps
added a |
created_at was returning 0, only if the value was updated via API.
also, noticed a variable type
newSettingps
so i made it the ol' shadow variable with an underscore