adobe / da-admin

Apache License 2.0
0 stars 4 forks source link

Add new metadata for pure copies to get them a new version history #57

Closed bosschaert closed 2 months ago

bosschaert commented 2 months ago

Description

When a resource is copied it should get a fresh version history.

The rename operation also uses the copy operation internally, in that case existing metadata is reused as before to preserve version history.

Related Issue

Fixes #56

How Has This Been Tested?

Types of changes

Checklist:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.03%. Comparing base (48867b1) to head (5c6170d).

Files Patch % Lines
src/storage/object/copy.js 96.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #57 +/- ## ========================================== - Coverage 82.72% 80.03% -2.69% ========================================== Files 14 15 +1 Lines 909 1002 +93 ========================================== + Hits 752 802 +50 - Misses 157 200 +43 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bosschaert commented 2 months ago

Note that the total coverage actually went up as a source file (copy.js) that had previously 0% coverage is now partly covered. However codecov doesn't include files that aren't touched at all so it doesn't reflect this.

bstopp commented 2 months ago

However codecov doesn't include files that aren't touched at all so it doesn't reflect this.

You can (and maybe we should?) change this setting so it reports even on untouched files. It will tank the overall score, but it would be much more accurate.

bosschaert commented 2 months ago

However codecov doesn't include files that aren't touched at all so it doesn't reflect this.

You can (and maybe we should?) change this setting so it reports even on untouched files. It will tank the overall score, but it would be much more accurate.

Great idea! Created https://github.com/adobe/da-admin/pull/58