Commit 158214a
authored
fix(github): make branch protection usable and wire workflow_id to its endpoint (#7308)
* fix(github): make branch protection usable and wire workflow_id to its endpoint
`github_update_branch_protection` could not be called. `restrictions` was a
required tool param with no subBlock anywhere in the block, so every run threw
"Restrictions is required for GitHub Update Branch Protection" before the
request. The other three body fields were `required: true` behind `mode:
'advanced'` subBlocks that are hidden by default, and their subBlock types did
not match their param types.
GitHub documents all four as required but nullable - "Set to null to disable" -
so "required" there means present in the body, which `null` satisfies. Sim's
`required: true` means the user must supply a non-empty value, which is strictly
stronger. The params are now optional and the body builder supplies the explicit
`null` GitHub demands for each field left unset, normalizing the editor's JSON
strings and the dropdown's 'true'/'false' along the way. A `restrictions`
subBlock is added.
`workflow_id` rendered for `github_list_workflow_runs` but the tool declared no
such param and always hit the repo-wide `/actions/runs`. It now selects
`GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs`, which GitHub
documents as accepting the same query filters.
No subBlock id is renamed or removed and no visibility is flipped.
* fix(github): name the branch-protection parse failure without echoing the input1 parent bd49a7e commit 158214a
8 files changed
Lines changed: 508 additions & 44 deletions
File tree
- apps
- docs/content/docs/integrations
- sim
- blocks/blocks
- tools
- generated
- github
- packages/deployment-config/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
| |||
1805 | 1805 | | |
1806 | 1806 | | |
1807 | 1807 | | |
1808 | | - | |
| 1808 | + | |
1809 | 1809 | | |
1810 | 1810 | | |
1811 | 1811 | | |
1812 | 1812 | | |
1813 | 1813 | | |
1814 | 1814 | | |
1815 | 1815 | | |
| 1816 | + | |
1816 | 1817 | | |
1817 | 1818 | | |
1818 | 1819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
996 | 1004 | | |
997 | 1005 | | |
998 | 1006 | | |
| |||
2407 | 2415 | | |
2408 | 2416 | | |
2409 | 2417 | | |
2410 | | - | |
| 2418 | + | |
2411 | 2419 | | |
2412 | | - | |
| 2420 | + | |
| 2421 | + | |
2413 | 2422 | | |
2414 | 2423 | | |
2415 | 2424 | | |
| |||
Large diffs are not rendered by default.
0 commit comments