Conversation
…ut types Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot update JavaScript membership check so that it cancels the workflow, not fails it. Use core.setCancelled to cancel workflow. See error: Repository permission check failed: Copilot is not a user |
1 similar comment
|
@copilot update JavaScript membership check so that it cancels the workflow, not fails it. Use core.setCancelled to cancel workflow. See error: Repository permission check failed: Copilot is not a user |
…f process.exit Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated JavaScript membership check to use Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Updated JavaScript membership check to use |
Updated the JavaScript membership check to use Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Updated the JavaScript membership check to use |
|
@copilot review all actions/github-script JavaScript and check for in orrect usage as documented in https://github.com/actions/toolkit/tree/main/packages/core
|
…re.warning Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed all incorrect GitHub Actions toolkit usage in JavaScript files. Replaced Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR implements comprehensive test workflows for all 10 documented safe output types in the gh-aw system, addressing the need for validation of safe output functionality across different output types, fixes workflow permission check behavior to properly cancel workflows instead of failing them, and corrects incorrect GitHub Actions toolkit API usage.
What was added
Created 10 test agentic workflows in
.github/workflows/following the naming patterntest-safe-output<type>.md:Key features
Each workflow demonstrates:
staged: true) to prevent actual GitHub API interactions during testingworkflow_dispatchfor manual testing and relevant event typesWorkflow permission check fixes
Updated JavaScript membership check behavior to properly cancel workflows instead of failing them:
check_permissions.cjs: Replacedprocess.exit()calls withcore.setCancelled()for graceful workflow cancellationmissing_tool.cjs: Updated error handler to usecore.setFailed()instead ofprocess.exit()GitHub Actions toolkit fixes
Fixed incorrect usage of Actions toolkit APIs as documented in https://github.com/actions/toolkit/tree/main/packages/core:
validate_errors.cjs: Replacedcore.warn()with correctcore.warning()methodadd_reaction_and_edit_comment.cjs: Replacedcore.warn()with correctcore.warning()methodvalidate_errors.test.cjsto expect the correctcore.warning()API callsThis ensures that when permission checks fail (e.g., "Copilot is not a user"), workflows are cancelled gracefully rather than marked as failed, providing better user experience and clearer workflow status. The toolkit fixes ensure proper GitHub Actions integration and logging behavior.
Example usage
The workflows show how custom engines can leverage the safe output system:
Validation
make recompileGITHUB_AW_SAFE_OUTPUTS_STAGED: "true"environment variablesThis provides a complete reference implementation for each safe output type and enables thorough testing of the safe output processing system, while ensuring proper workflow behavior when permission checks fail and correct GitHub Actions toolkit usage throughout the codebase.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.