Added automatic updates for version fields in plugin metadata files#116
Added automatic updates for version fields in plugin metadata files#116rostalan wants to merge 1 commit intoredhat-developer:mainfrom
Conversation
jonkoops
left a comment
There was a problem hiding this comment.
Rather than having the validation action be responsible for correcting the information. We should instead be modifying the update-overlay action, which creates the PR, and should be able to determine the package versions.
This information should probably be passed into the action itself by the main workflow that triggers it, which should already have collected detailed information about the plugins.
|
|
Added to https://issues.redhat.com/browse/RHIDP-12565 because there was no associated JIRA. Later discovered https://issues.redhat.com/browse/RHIDP-12378 |
| const pluginVersions = {}; | ||
| for (const plugin of workspace.plugins) { | ||
| pluginVersions[plugin.name] = plugin.version; | ||
| } | ||
| core.setOutput('plugin-versions', JSON.stringify(pluginVersions)); |
There was a problem hiding this comment.
Considering we are likely to use other workspace metadata, we might consider simply passing in the entire workspace JSON.
@davidfestal @rostalan wdyt?
| } | ||
|
|
||
| /** @type {{ repository: { metadataTree: { entries: Array<{name: string, object: {text: string} | null}> } | null } }} */ | ||
| const metadataResponse = await github.graphql(` |
There was a problem hiding this comment.
We already run into problems with rate limiting at the moment, so it would be best to roll this up into the existing query, and then pass it along to the updateMetadataFiles() function as an argument. Let's also use a re-usable type for this.


Automated the updating for
spec.versionandspec.dynamicArtifact(only forghcr.io).It updates the known values and commits back to the branch.
This should reduce the need to do it manually (e.g. when using the update workflow in overlays).