fix: upgrade tsconfig lib/target to es2022 to resolve Array.at() TS2550 error#20849
Merged
pelikhan merged 2 commits intoclaude/configure-smoke-agent-workflowfrom Mar 13, 2026
Conversation
…rray.at() Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [67010302120] Fix the failing GitHub Actions workflow
fix: upgrade tsconfig lib/target to es2022 to resolve Array.at() TS2550 error
Mar 13, 2026
pelikhan
approved these changes
Mar 13, 2026
4342f79
into
claude/configure-smoke-agent-workflow
103 checks passed
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the JS action TypeScript configuration to ES2022 to fix CI typechecking failures (TS2550 on Array.prototype.at) and syncs the host-repo resolver script/tests with main by adding a new output used by downstream steps.
Changes:
- Bumped
actions/setup/js/tsconfig.jsontarget/libfromes2020toes2022to align with ES2022 runtime usage (Array.at()). - Added a
target_repo_nameoutput toresolve_host_repo.cjs(repo name without owner prefix). - Added/updated tests to cover
target_repo_nameoutput behavior across invocation scenarios.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
actions/setup/js/tsconfig.json |
Moves TS target/lib to ES2022 so Array.at() is type-safe under checkJs. |
actions/setup/js/resolve_host_repo.cjs |
Emits target_repo_name derived from target_repo for consumers needing repo-only names. |
actions/setup/js/resolve_host_repo.test.cjs |
Adds coverage for the new target_repo_name output across cross-repo/same-repo/fallback cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
lpcox
added a commit
that referenced
this pull request
Mar 13, 2026
…repos (#20830) * Initial plan * Plan: Configure smoke-agent workflow with guard policies Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * Configure smoke-agent workflow with guard policies for public repos Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * Use local GitHub MCP container instead of remote mode Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * fix: add 3 missing action pins entries to resolve TestGetActionPinsSorting failure (#20831) * Initial plan * fix: add 3 missing action pins to fix TestGetActionPinsSorting test failure Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * Fix: Generate write-sink with accept:* for repos='public'/'all' When repos is set to "public" or "all", the renderer now creates a write-sink configuration with accept: ["*"] instead of returning nil. This ensures safe outputs work correctly with guard policies. Changes: - Updated deriveSafeOutputsGuardPolicyFromGitHub() to return accept:["*"] - Updated test cases to expect accept:["*"] for repos="all" and repos="public" - Updated documentation and specification to reflect new behavior - Verified smoke-agent workflow compiles with correct guard-policies Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * Update PR title and description Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * fix: add 3 missing action pins to resolve TestGetActionPinsSorting failure (#20837) * Initial plan * fix: add 3 missing action pin entries to resolve TestGetActionPinsSorting failure Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * updated mcpg version * [WIP] [67003058781] Fix the failing GitHub Actions workflow test (#20838) * Initial plan * fix: make TestGetActionPinsSorting resilient to JSON pin count changes Instead of hardcoding the expected pin count (34), the test now dynamically derives the expected count by parsing actionPinsJSON directly. This ensures: - The test always validates that getActionPins() returns all entries from JSON - No manual count updates needed when new pins are added - Resilient to Go test cache issues where stale binaries could cause failures Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * feat: add guard policy smoke test matrix Rename smoke-agent to smoke-agent-public-approved to reflect its guard policy params, and add four new workflows to test different repos scope × min-integrity combinations: - all/none: most permissive, all repos, no integrity requirement - all/merged: most restrictive, all repos, merged content only - scoped/approved: explicit repo patterns (github/gh-aw, github/*), approved - public/none: public repos only, no integrity requirement Each workflow exercises search_repositories, list_issues, and search_code to test guard policy filtering effectiveness, then aggregates results into a safe-outputs PR comment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: upgrade tsconfig lib/target to es2022 to resolve Array.at() TS2550 error (#20849) * Initial plan * fix: upgrade tsconfig target/lib to es2022 to fix TS2550 error with Array.at() Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * Fix two failing JS tests: call_workflow empty allowlist and create_discussion fallback note (#20852) * Initial plan * Initial plan: fix two failing JS tests Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * Fix two failing JS tests: call_workflow empty allowlist and create_discussion fallback note Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Landon Cox <landon.cox@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
jsCI job was failing becauseresolve_host_repo.cjsusesArray.prototype.at(-1)(ES2022+), buttsconfig.jsonspecifiedlib: ["es2020"], causingerror TS2550: Property 'at' does not exist on type 'string[]'.Changes
tsconfig.json: Bumpedtargetandlibfromes2020→es2022, consistent withtsconfig.build.jsonwhich already targets ES2022resolve_host_repo.cjs: Synced withmain— addstargetRepoNameoutput (repo name without owner prefix) used byactions/create-github-app-tokenresolve_host_repo.test.cjs: Synced withmain— adds 3 test cases coveringtarget_repo_nameoutput for cross-repo, same-repo, and fallback scenariosWarning
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:
https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js --quiet e_modules/.bin/g--verify git bran�� -M main e/git-upload-pack tions/setup/nodenode h it git(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.