Skip to content

feat: add repository_dispatch to update CLI version on GitHub Action repos#566

Open
jonathannorris wants to merge 3 commits intomainfrom
chore-update-cli-version-on-actions
Open

feat: add repository_dispatch to update CLI version on GitHub Action repos#566
jonathannorris wants to merge 3 commits intomainfrom
chore-update-cli-version-on-actions

Conversation

@jonathannorris
Copy link
Copy Markdown
Member

@jonathannorris jonathannorris commented Apr 14, 2026

Summary

  • Adds repository_dispatch events to the CLI release workflow that trigger CLI version updates on feature-flag-pr-insights-action and feature-flag-code-usage-action
  • Gated on minor or patch releases, matching the existing vscode-extension update behavior
  • Fixes server.json formatting and uses jq --indent 4 in the release workflow to prevent future drift

The target repos will each have a receiver workflow that handles the update, rebuilds dist/, and opens a PR.

@jonathannorris jonathannorris requested a review from a team as a code owner April 14, 2026 19:42
Copilot AI review requested due to automatic review settings April 14, 2026 19:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dispatch steps to trigger update-cli-version in feature-flag-pr-insights-action.
  • Add two repository_dispatch steps to trigger update-cli-version in feature-flag-code-usage-action.
  • Gate both dispatches to run only for minor and patch workflow_dispatch releases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 14, 2026 19:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +138 to +140
- name: Update GitHub Actions
if: inputs.npm-version == 'minor' || inputs.npm-version == 'patch'
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants