adobe/helix-static

surrogate-key computation needs to use base ref instead of commit sha

tripodsan opened this issue ยท 1 comments

The surrogate-key computation uses the context.content.sources, which specifies the entire, original url where the markdown content was fetched. for example:

https://raw.githubusercontent.com/tripodsan/hlxtest/bb8fc39dc3e01021bf1d30ac1ed4d0de04cbf5bc/image.png

The problem is, that in order to (soft) purge the fastly cache, when the image.png is modified, the bot doesn't know exactly which SHA was used to deliver the resource.

the surrogate key should be computed using the original ref. e.g. master. suggest to include an additional parameter branch to the action params.

the surrogate key will then be computed using:

https://raw.githubusercontent.com/${owner}/${repo}/${branch}${path}

@trieloff helix-dispatch also needs to include the new branch param.

๐ŸŽ‰ This issue has been resolved in version 1.2.10 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€