feat: add repository_dispatch to update CLI version on GitHub Action repos#566
feat: add repository_dispatch to update CLI version on GitHub Action repos#566jonathannorris wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the existing CLI release workflow to notify downstream GitHub Action repositories to update their pinned CLI version whenever a minor or patch release is cut, aligning with the current VSCode extension update behavior.
Changes:
- Add two
repository_dispatchsteps to triggerupdate-cli-versioninfeature-flag-pr-insights-action. - Add two
repository_dispatchsteps to triggerupdate-cli-versioninfeature-flag-code-usage-action. - Gate both dispatches to run only for
minorandpatchworkflow_dispatchreleases.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Update GitHub Actions | ||
| if: inputs.npm-version == 'minor' || inputs.npm-version == 'patch' | ||
| uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 |
There was a problem hiding this comment.
npm-version input name contains a hyphen, so references like inputs.npm-version are parsed as an expression with - (subtraction) rather than property access. This will cause the if: condition (and any other use of this input) to evaluate incorrectly or fail. Use bracket notation (inputs['npm-version']) for the condition (and update other references in this workflow for consistency).
Summary
repository_dispatchevents to the CLI release workflow that trigger CLI version updates onfeature-flag-pr-insights-actionandfeature-flag-code-usage-actionminororpatchreleases, matching the existing vscode-extension update behaviorserver.jsonformatting and usesjq --indent 4in the release workflow to prevent future driftThe target repos will each have a receiver workflow that handles the update, rebuilds
dist/, and opens a PR.