-
Notifications
You must be signed in to change notification settings - Fork 80
FIX: script and cron action yml #856
Conversation
🚀 Deployed on https://deploy-preview-856--etna-docs.netlify.app |
Codecov Report
@@ Coverage Diff @@
## master #856 +/- ##
===========================================
- Coverage 84.66% 49.36% -35.30%
===========================================
Files 130 130
Lines 7414 7414
===========================================
- Hits 6277 3660 -2617
- Misses 1137 3754 +2617
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
||
def get_list_to_remove(leave_last_n_images: int, image_versions: list): | ||
image_versions = sorted( | ||
image_versions, key=lambda x: datetime.datetime.strptime(x["created_at"], "%Y-%m-%dT%H:%M:%SZ") |
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.
Isn't it iso-format? Probably we can use datetime.datetime.fromisoformat.
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.
Z at the end
def remove_images(image_versions: list): | ||
for image in image_versions: | ||
print(f"Removing {image['url']}") | ||
subprocess.run( |
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.
Why do we need such a strange way of running this code?
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.
For some reason non-get empty requests return 422 error.
This is workaround.
Before submitting (must do checklist)
Proposed Changes
Closing issues
closes #773