ci: trigger all SDK generators on release#2905
Conversation
📝 WalkthroughWalkthroughAdded three new workflow-dispatch steps to the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/sdk-generator.yml (1)
3-6:⚠️ Potential issue | 🟡 MinorPre-existing:
workflow_dispatchis nested underrelease, so manual runs are not enabled.Not part of this PR's diff, but worth fixing while you're here — given this PR's intent to "trigger all SDK generators on release," you'll likely also want manual dispatch to work for re-running after a failure. Currently
workflow_dispatch:is indented as a child ofrelease:(treated as an invalidtypessibling key) instead of being a top-level trigger.🔧 Proposed fix
on: release: types: [published] - workflow_dispatch: + workflow_dispatch:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/sdk-generator.yml around lines 3 - 6, The workflow defines the triggers incorrectly: move workflow_dispatch out from under the release key so it is a top-level trigger alongside release. Edit the YAML so that the "on:" block contains "release: types: [published]" and a separate "workflow_dispatch:" entry at the same indentation level as "release" (e.g., "on:\n release: ...\n workflow_dispatch: {}"), ensuring manual dispatch is enabled for reruns; keep the existing "release" configuration (the "release" and "workflow_dispatch" keys are the unique symbols to adjust).
🧹 Nitpick comments (1)
.github/workflows/sdk-generator.yml (1)
35-58: Optional: DRY the repeated dispatch steps with a matrix.The five dispatch steps are now near-identical except for
workflow,repo, andref. Consider collapsing them into a matrix job to reduce duplication and make future SDK additions a one-line change.♻️ Example refactor
jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - repo: Permify/permify-java workflow: generator.yml ref: master - repo: Permify/permify-python workflow: generator.yml ref: main - repo: Permify/permify-javascript workflow: generator.yml ref: main - repo: Permify/permify-typescript workflow: generator.yml ref: master - repo: Permify/permify-node workflow: protos.yml ref: main steps: - name: Harden Runner uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3 with: egress-policy: audit - name: Invoke ${{ matrix.workflow }} in ${{ matrix.repo }} uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 with: workflow: ${{ matrix.workflow }} repo: ${{ matrix.repo }} ref: ${{ matrix.ref }} token: ${{ secrets.SDK_GH_TOKEN }}Note:
actions/checkoutis not actually used by any of the dispatch steps, so it can be dropped as well.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/sdk-generator.yml around lines 35 - 58, The repeated workflow-dispatch steps are duplicated; replace them with a matrix-driven job (e.g., under jobs.build with strategy.matrix.include) that defines entries for repo, workflow, and ref (examples: Permify/permify-java, Permify/permify-python, Permify/permify-javascript, Permify/permify-typescript, Permify/permify-node) and consolidate the repeated steps into a single step that uses benc-uk/workflow-dispatch and references ${{ matrix.workflow }}, ${{ matrix.repo }}, and ${{ matrix.ref }} (rename the step to something like "Invoke ${{ matrix.workflow }} in ${{ matrix.repo }}"); remove the now-unnecessary duplicate dispatch steps (and drop unused actions/checkout if present).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In @.github/workflows/sdk-generator.yml:
- Around line 3-6: The workflow defines the triggers incorrectly: move
workflow_dispatch out from under the release key so it is a top-level trigger
alongside release. Edit the YAML so that the "on:" block contains "release:
types: [published]" and a separate "workflow_dispatch:" entry at the same
indentation level as "release" (e.g., "on:\n release: ...\n workflow_dispatch:
{}"), ensuring manual dispatch is enabled for reruns; keep the existing
"release" configuration (the "release" and "workflow_dispatch" keys are the
unique symbols to adjust).
---
Nitpick comments:
In @.github/workflows/sdk-generator.yml:
- Around line 35-58: The repeated workflow-dispatch steps are duplicated;
replace them with a matrix-driven job (e.g., under jobs.build with
strategy.matrix.include) that defines entries for repo, workflow, and ref
(examples: Permify/permify-java, Permify/permify-python,
Permify/permify-javascript, Permify/permify-typescript, Permify/permify-node)
and consolidate the repeated steps into a single step that uses
benc-uk/workflow-dispatch and references ${{ matrix.workflow }}, ${{ matrix.repo
}}, and ${{ matrix.ref }} (rename the step to something like "Invoke ${{
matrix.workflow }} in ${{ matrix.repo }}"); remove the now-unnecessary duplicate
dispatch steps (and drop unused actions/checkout if present).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f2a5c82f-b554-4a9d-9704-6c402e25dd1c
📒 Files selected for processing (1)
.github/workflows/sdk-generator.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2905 +/- ##
=======================================
Coverage 82.59% 82.59%
=======================================
Files 74 74
Lines 8297 8297
=======================================
Hits 6852 6852
Misses 909 909
Partials 536 536 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit