Commit 867ae42
Add assign-to-user safe output type (#5340)
* Initial plan
* Add assign-to-user safe output type for assigning users to issues
- Add JSON schema definition for assign-to-user in main_workflow_schema.json
- Add AssignToUserConfig struct and parsing logic
- Create pkg/workflow/assign_to_user.go for job builder
- Create pkg/workflow/js/assign_to_user.cjs JavaScript implementation
- Add assign_to_user tool to safe_outputs_tools.json
- Register script and embed directive in scripts.go and js.go
- Add to generateFilteredToolsJSON(), generateSafeOutputsConfig(), HasSafeOutputsEnabled()
- Add to compiler_jobs.go for job building
- Add to safe_output_validation_config.go for validation
- Update tests in safe_outputs_tools_test.go and safe_output_validation_config_test.go
- Update documentation in docs/src/content/docs/reference/safe-outputs.md
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
* Fix default max value in parseBaseSafeOutputConfig call
Change from 0 to 1 to match documented default behavior.
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
* Refactor parseAssignToUserConfig to use ParseListJobConfig
Reduce code duplication and improve consistency with other similar
parsing functions.
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
* Add test-assign-to-user.md workflow for assign_to_user safe output
This adds a test agentic workflow that exercises the new assign-to-user
safe output type.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* Add changeset [skip-ci]
* Update dev.md to use assign-to-user for mrjf on workflow dispatch
Changes the dev workflow from using assign-to-agent (Copilot) to
assign-to-user (mrjf) for issue assignment.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* Fix assign-to-user job not being invoked on workflow_dispatch
The assign_to_user job requires `target: "*"` when triggered via
workflow_dispatch since there's no issue context. Without this, the
job condition included `(github.event.issue.number)` which evaluates
to falsy on workflow_dispatch events.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* Fix resolveTarget to handle issue_number field for target="*"
When target="*", the resolveTarget function now checks for
item.issue_number in addition to item.item_number and
item.pull_request_number. This fixes assign_to_user failing when
the agent output uses the standard issue_number field.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* Update dev.md to pick any open unassigned issue
Changed from searching for specific "[deps]" issues to searching for
any open issue that isn't already assigned to mrjf. This makes the
workflow more general and useful for testing assign-to-user.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* Fix: Update setup-node action version and streamline numberField assignment in safe_output_helpers
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>1 parent 3fb6bc2 commit 867ae42
26 files changed
Lines changed: 986 additions & 521 deletions
File tree
- .changeset
- .github/workflows
- docs/src/content/docs/reference
- pkg
- cli/workflows
- parser/schemas
- workflow
- js
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments