fix: add github.event_name to JS allowed expressions list#22084
Merged
fix: add github.event_name to JS allowed expressions list#22084
github.event_name to JS allowed expressions list#22084Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/9d816964-495d-4fb6-a840-6ab9c6b3d142
Copilot
AI
changed the title
[WIP] Investigate whether github.event_name is an allowed variable
fix: add Mar 21, 2026
github.event_name to JS allowed expressions list
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes runtime import expression interpolation failures when workflows reference ${{ github.event_name }} by aligning the JavaScript runtime allowlist/context with the existing Go AllowedExpressions.
Changes:
- Add
github.event_nameto the JavaScriptALLOWED_EXPRESSIONSallowlist. - Map
github.event_nameto the real runtime value viaevent_name: context.eventNamein the evaluation context. - Extend tests to cover
isSafeExpressionandevaluateExpressionbehavior forgithub.event_name.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| actions/setup/js/runtime_import.cjs | Adds github.event_name to the allowlist and provides a concrete runtime value in evalContext.github. |
| actions/setup/js/runtime_import.test.cjs | Updates mock context and adds assertions to validate allowlisting + evaluation of github.event_name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
github.event_namewas present in the GoAllowedExpressionsconstant but missing from the JavaScriptALLOWED_EXPRESSIONSarray inruntime_import.cjs, causing the activation job to fail at the "Interpolate variables and render templates" step when workflows referenced${{ github.event_name }}.Changes
runtime_import.cjs: Add"github.event_name"toALLOWED_EXPRESSIONS; addevent_name: context.eventNameto the runtime evaluation context so the expression resolves to its actual value rather than being passed through as a raw expressionruntime_import.test.cjs: AddeventNameto mock context; addisSafeExpressionandevaluateExpressioncoverage forgithub.event_nameWarning
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:
invalid.example.invalid/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git e/git init�� k/node_modules/.-u git tions/setup/js/node_modules/.bin/git user.email test@example.comcheckout /git git bran�� -M main k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/git /tmp/bare-incremgit gin/feature-branadd cal/bin/git git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.