-
Notifications
You must be signed in to change notification settings - Fork 30
enhance(build): return build on CreateBuild and UpdateBuild #701
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #701 +/- ##
==========================================
- Coverage 58.08% 55.10% -2.99%
==========================================
Files 255 201 -54
Lines 15876 15972 +96
==========================================
- Hits 9222 8801 -421
- Misses 6249 6789 +540
+ Partials 405 382 -23
|
cognifloyd
left a comment
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.
Looks sane
| return nil, err | ||
| } | ||
|
|
||
| return build.Crop().ToLibrary(), nil |
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.
Have we confirmed the build object has the ID field populated with this change?
We don't explicitly set that ID field in our codebase which is why I ask.
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.
When gorm saves the object, it populates the ID field, right?
|
closing because this has become a mess. Will just use a new branch |
Part of the effort for go-vela/community#613. It would be helpful to not have to make two calls to the database during our webhook process. This can be remedied by returning the created build object when it's saved to the database.