ic-js
ic-js copied to clipboard
Improve update-ic.yml to handle no changes
Features
If no changes are detected, the CI job update-ic.yml should not update the comment within the did file, that way there are less noise in the provided PR.
Example
Such a comment should not be updated if no changes.
// Generated from IC repo commit 04775a0 (2024-03-21 tags: release-2024-03-20_23-01-p2p) 'rs/rosetta-api/icp_ledger/index/index.did' by import-candid
I think it should be updated. That way we can see the file was up-to-date at that date. Otherwise it might look like a file is very stale while it's not.
It's one way to look at it, but I see it the other way around: the goal of the job is to identify new features and help us process them without creating additional overhead while limiting maintenance work.
Maybe if none of the files have updates, we can not do any updates. But if any of the files have updates, we update all of them to the new date/version. That way we have a minimal number of PRs but we still are mostly up-to-date.