-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(output): handle --unix-timestamp
flag
#4079
fix(output): handle --unix-timestamp
flag
#4079
Conversation
--unix-timestamp
flag
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.
Great catch @pedrooot 👏
@@ -29,7 +29,7 @@ class FindingOutput(BaseModel): | |||
""" | |||
|
|||
auth_method: str | |||
timestamp: datetime | |||
timestamp: Union[int, datetime] |
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.
Can you add a test creating a FindingOutput
with the unix timestamp?
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.
Sure!
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.
Done ✅
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4079 +/- ##
==========================================
+ Coverage 86.27% 86.29% +0.02%
==========================================
Files 790 790
Lines 24729 24729
==========================================
+ Hits 21335 21340 +5
+ Misses 3394 3389 -5 ☔ View full report in Codecov by Sentry. |
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.
Great work @pedrooot 👏
Context
Fixes #4077
Description
Modify FindingOutput class to make timestamp an int or datetime.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.