Skip to content

Comments

fix: preserve expression-based draft boolean in create-pull-request handler config#17597

Merged
pelikhan merged 9 commits intomainfrom
copilot/fix-draft-expression-handler-config
Feb 22, 2026
Merged

fix: preserve expression-based draft boolean in create-pull-request handler config#17597
pelikhan merged 9 commits intomainfrom
copilot/fix-draft-expression-handler-config

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

The draft boolean field in safe-outputs.create-pull-request was typed as *bool, which couldn't unmarshal GitHub Actions expression strings like ${{ inputs.draft-prs }}. This left the field nil, causing AddBoolPtr to silently omit it from GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG. The handler then fell back to its default draft behavior regardless of the runtime value.

The fallback-as-issue and fallback-to-issue fields affect compile-time behavior (permissions in the generated .lock.yml) and remain plain *bool fields.

Changes

Templatable field infrastructure (dedicated files)

  • pkg/workflow/templatables.go — canonical home for all templatable-field helpers, with a doc comment explaining the concept (fields that don't affect .lock.yml but can accept GitHub Actions expressions):
    • preprocessBoolFieldAsString(configData, fieldName, log) — converts YAML booleans to strings before unmarshaling so *string fields accept both literal booleans and expression strings; rejects free-form strings that are not GitHub Actions expressions (must match ${{ … }})
    • AddTemplatableBool(key, *string) on handlerConfigBuilder — stores "true"/"false" as proper JSON booleans (backward-compatible) and expression strings as-is for runtime evaluation
  • actions/setup/js/templatable.cjs — JS counterpart with parseBoolTemplatable(value, defaultValue) for use by safe-output handlers that need expression support at runtime
  • actions/setup/js/templatable.test.cjs — full test suite for parseBoolTemplatable

JSON Schema

  • $defs.templatable_boolean — new reusable type in the main workflow schema that captures the "literal boolean or GitHub Actions expression string" pattern; the string branch is constrained by pattern: ^\$\{\{.*\}\}$ to reject free-form strings; future templatable boolean fields need only a single $ref
  • draft — references #/$defs/templatable_boolean via allOf: [{"$ref": ...}]
  • fallback-as-issue and fallback-to-issue — remain {type: boolean} since they affect compile-time behavior in the generated .lock.yml

Applied to templatable boolean fields

  • CreatePullRequestsConfig.Draft: *bool*string; uses preprocessBoolFieldAsString + AddTemplatableBool
  • CreatePullRequestsConfig.FallbackAsIssue: remains *bool — controls whether issues:write is included in the compiled .lock.yml
  • CreateDiscussionsConfig.FallbackToIssue: remains *bool — plain boolean, not a runtime expression
  • GH_AW_PR_DRAFT env var: uses strings.HasPrefix(val, "${{") to embed expressions unquoted in the compiled YAML

JS handlers updated

  • create_pull_request.cjs: draftDefault uses parseBoolTemplatable() from templatable.cjs; fallbackAsIssue uses plain !== false evaluation
  • create_discussion.cjs: fallbackToIssue uses plain !== false evaluation
  • tool_description_enhancer.go: checks == "true" explicitly for draft to avoid treating unresolved expressions as draft mode

Example — now compiles and propagates correctly:

safe-outputs:
  create-pull-request:
    draft: ${{ inputs.draft-prs }}
Original prompt

This section details on the original issue you should resolve

<issue_title>create-pull-request draft expression is dropped from handler config</issue_title>
<issue_description>When safe-outputs.create-pull-request.draft is set via expression (e.g. ${{ inputs.draft-prs }}), the value is not propagated to GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG.

Result: create_pull_request handler does not receive draft, so it falls back to default draft behavior.

Expected: expression-based draft values should be preserved and honored at runtime (same as other dynamic config fields).</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ndler config

When `safe-outputs.create-pull-request.draft` was set via a GitHub Actions
expression (e.g. `${{ inputs.draft-prs }}`), the value was silently dropped
from `GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG`.

Root cause: `Draft *bool` could not unmarshal expression strings, leaving the
field nil, which caused `AddBoolPtr` to skip it.

Fix:
- Change `Draft *bool` to `Draft *string` to support both literal booleans
  (pre-processed before unmarshal) and expression strings
- Update schema to accept string in addition to boolean for `draft`
- Use `AddStringPtr` in handler config builder
- Update JS handler to correctly parse string "false" (previously truthy in JS)
- Add test for expression-based draft compilation

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix draft expression handling in create pull request config fix: preserve expression-based draft values in create-pull-request handler config Feb 21, 2026
@pelikhan
Copy link
Contributor

@copilot

  • refactor the helpers to handled templetable fields (field that do not change the generated .lock.yml code)
  • apply to other Boolean fields in safe outputs

Extract the ad-hoc bool→string preprocessing for `draft` into a shared
helper `preprocessBoolFieldAsString`, and add a new `AddTemplatableBool`
builder method that properly maps "true"/"false" to JSON booleans and
passes expression strings through for runtime evaluation.

Apply the templatable-boolean pattern to:
- `FallbackAsIssue *bool` → `*string` (CreatePullRequestsConfig)
- `FallbackToIssue *bool` → `*string` (CreateDiscussionsConfig)

Both fields now accept `${{ inputs.x }}` expressions in addition to
literal booleans.  `getFallbackAsIssue()` returns true for expressions
(safe default for compile-time permission decisions).

JS handlers updated: use `String(x) !== "false"` for both fields so
that string "false" from a resolved expression is correctly treated as
falsy (previously `x !== false` would treat "false" string as truthy).

Schema updated to accept boolean|string for both fallback fields.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

@copilot

  • refactor the helpers to handled templetable fields (field that do not change the generated .lock.yml code)...

Done in 8c52f20. Here's what was added/changed:

New shared infrastructure:

  • preprocessBoolFieldAsString(configData, fieldName, log) in config_helpers.go — replaces the ad-hoc bool→string conversion that was inline in parsePullRequestsConfig
  • AddTemplatableBool(key, *string) on handlerConfigBuilder — stores "true"/"false" as proper JSON booleans and expression strings as-is for runtime evaluation by GitHub Actions

Applied to:

  • draft — now uses preprocessBoolFieldAsString + AddTemplatableBool (no more ad-hoc code)
  • FallbackAsIssue *bool*string — same pattern; getFallbackAsIssue() returns true for expressions (safe compile-time default for issues:write permission)
  • FallbackToIssue *bool*string — same pattern in CreateDiscussionsConfig

JS handlers — fixed fallback_as_issue and fallback_to_issue to use String(x) !== "false" so the string "false" from a resolved expression is correctly treated as falsy.

Schemafallback-as-issue and fallback-to-issue now accept boolean | string.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw /opt/hostedtoolc-c /opt/hostedtoolcgit-upload-pack &#39;origin&#39; git rev-�� --show-toplevel node /opt/hostedtoolcache/node/24.13.0/x64/bin/node -nilfunc bash /opt/hostedtoolc--show-toplevel node (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go ache�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha qbrT4ak5e cfg 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git 64/pkg/tool/linux_amd64/compile --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel 64/pkg/tool/linux_amd64/compile rev-�� --show-toplevel git ache/node/24.13.0/x64/bin/node --show-toplevel bash ache/node/24.13.--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh -c &#34;prettier&#34; --che-f GOPROXY 64/bin/go ettierignore GOWORK 64/bin/go go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel sed /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha get --global 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -unreachable=false /tmp/go-build320000584/b041/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git oCLn1vH0z cfg 64/pkg/tool/linu--show-toplevel git init�� (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --noprofile /rg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build320000584/b096/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /hom�� --check **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti-c go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go m/_n�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha scripts/**/*.js --ignore-path 64/bin/go tierignore git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha get --global 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --get-regexp --global 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -unreachable=false /tmp/go-build320000584/b047/vet.cfg 000584/b275/vet.cfg (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha echo &#34;��� JavaScript formatting GOINSECURE node 64/bin/go -d git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha get --global 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha xterm-color 64/pkg/tool/linux_amd64/vet /usr/bin/git --local cfg 64/pkg/tool/linu--show-toplevel git comm�� -m Initial commit 0/x64/bin/node rd (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw git 0/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse 64/pkg/tool/linu--show-toplevel git arne�� --show-toplevel 64/pkg/tool/linu--package-lock-only 0/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/node-json go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha g/stringutil/ansGOINSECURE g/stringutil/ideGOMOD 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 56750/b405/_pkg_GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha g/styles/theme.gGOINSECURE g/styles/theme_tGOMOD $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 56750/b407/_pkg_GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha get --global 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 9go7lghnq cfg 64/pkg/tool/linu--show-toplevel git conf�� user.name Test User 0/x64/bin/node om/pmezard/go-digit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha &#34;type&#34;[[:space:]]*:[[:space:]]*&#34;(create_pull_request|push_to_pull_request_branch)&#34; reate_pull_request.cjs 0/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse 64/pkg/tool/linu--show-toplevel git arne�� --show-toplevel 64/pkg/tool/linu--package-lock-only 0/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha g/sliceutil/slicGOINSECURE g/sliceutil/slicGOMOD 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 56750/b403/_pkg_GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha /tmp/go-build519-f -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE GOPROXY ache/go/1.25.0/x64/bin/go GOSUMDB GOWORK 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --check scripts/**/*.js 64/bin/go .prettierignore git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --check scripts/**/*.js 64/bin/go /golden.go git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE node ache/go/1.25.0/x64/bin/go /usr/bin/gh git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha --check scripts/**/*.js 64/bin/go .prettierignore git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha &#34;prettier&#34; --che-f node ache/go/1.25.0/x-f -d git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --check scripts/**/*.js 64/bin/go -d git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha &#34;prettier&#34; --check &#39;scripts/**/*GOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --check scripts/**/*.js ache/go/1.25.0/x-f .prettierignore git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel git /usr/bin/git nner/work/gh-aw/node x_amd64/vet /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/gh git (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git nner/work/gh-aw/node x_amd64/vet /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/git git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title fix: preserve expression-based draft values in create-pull-request handler config fix: preserve expression-based boolean values in create-pull-request and create-discussion handler configs Feb 21, 2026
@pelikhan
Copy link
Contributor

At @copilot: refactor the helpers and code to handle boolean strings and templatables in files, templatable.cjs, and templatables.co, so this functionality can be reused with all other safe-outputs later.

Create pkg/workflow/templatables.go as the canonical Go home for all
"templatable field" helpers (fields that don't change the .lock.yml but
can accept expressions).  Move preprocessBoolFieldAsString (from
config_helpers.go) and AddTemplatableBool method (from
compiler_safe_outputs_config.go) there with a top-level doc comment.

Create actions/setup/js/templatable.cjs with parseBoolTemplatable() —
the JS counterpart used by safe-output handlers at runtime.  Add a full
test suite in templatable.test.cjs.

Update create_pull_request.cjs and create_discussion.cjs to use
parseBoolTemplatable() instead of the inline String(x) !== "false"
expressions.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

At @copilot: refactor the helpers and code to handle boolean strings and templatables in files, templatable.cjs, and templatables.co, so this functionality can be reused with all other safe-output...

Done in b99d944.

pkg/workflow/templatables.go — new canonical Go home for templatable-field helpers. preprocessBoolFieldAsString (moved from config_helpers.go) and AddTemplatableBool method (moved from compiler_safe_outputs_config.go) both live here, with a package-level doc comment explaining the "templatable field" concept so future contributors know where to add similar helpers.

actions/setup/js/templatable.cjs — new parseBoolTemplatable(value, defaultValue) helper that handles undefined/null, booleans, "true"/"false" strings, and arbitrary resolved expression values. Includes a full test suite in templatable.test.cjs.

create_pull_request.cjs and create_discussion.cjs now import and use parseBoolTemplatable instead of the inline String(x) !== "false" pattern.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha cgroup2 --noheadings 64/bin/go GOSUMDB GOWORK 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go --ignore-path .prettierignore 64/bin/go go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha d1ba547dcef3a557GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 4128817/b415/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/scripts GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha GOSUMDB GOWORK ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan marked this pull request as ready for review February 21, 2026 23:39
Copilot AI review requested due to automatic review settings February 21, 2026 23:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where boolean configuration fields in safe-outputs (draft, fallback-as-issue, and fallback-to-issue) couldn't accept GitHub Actions expressions like ${{ inputs.draft-prs }}. When expressions were provided, the fields were unmarshaled as nil due to type mismatch (*bool couldn't accept string expressions), causing the handlers to silently fall back to default behavior.

Changes:

  • Introduced templatable field infrastructure to support both literal boolean values and GitHub Actions expressions for runtime-evaluated config fields
  • Changed affected boolean fields from *bool to *string type with preprocessing to accept both literals and expressions
  • Updated environment variable generation to properly embed expressions unquoted for GitHub Actions evaluation

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/workflow/templatables.go New canonical home for templatable field helpers with preprocessBoolFieldAsString and AddTemplatableBool functions
actions/setup/js/templatable.cjs JavaScript counterpart with parseBoolTemplatable function for runtime evaluation
actions/setup/js/templatable.test.cjs Comprehensive test suite for the JS templatable parser
pkg/workflow/create_pull_request.go Updated Draft and FallbackAsIssue fields to *string, added preprocessing, updated env var generation
pkg/workflow/create_discussion.go Updated FallbackToIssue field to *string, added preprocessing, updated env var generation
pkg/workflow/compiler_safe_outputs_config.go Updated handler registry to use AddTemplatableBool instead of AddBoolPtr for affected fields
pkg/workflow/tool_description_enhancer.go Updated draft check to compare string value == "true"
pkg/workflow/test_helpers_shared_test.go Added strPtr helper function for tests
pkg/workflow/safe_outputs_permissions_test.go Updated test to use strPtr("false") instead of ptrBool(false)
pkg/workflow/safe_outputs_max_test.go Updated test assertions to expect string "true" instead of boolean
pkg/workflow/create_discussion_validation_test.go Updated tests to use strPtr and added test case for expression values
pkg/workflow/compiler_safe_outputs_config_test.go Updated tests to use testStringPtr and added expected value assertions
pkg/workflow/compile_outputs_pr_test.go Added new test for draft expression and updated fallback-as-issue assertion
pkg/parser/schemas/main_workflow_schema.json Updated schema to accept `boolean
actions/setup/js/create_pull_request.cjs Updated to use parseBoolTemplatable for draft and fallback_as_issue
actions/setup/js/create_discussion.cjs Updated to use parseBoolTemplatable for fallback_to_issue
Comments suppressed due to low confidence (3)

pkg/workflow/create_pull_request.go:117

  • The expression detection uses strings.HasPrefix(draftVal, "${{") but doesn't validate that the expression is properly closed with }}. While GitHub Actions will likely reject malformed expressions at runtime, consider adding validation to ensure the expression is well-formed (e.g., strings.HasPrefix(val, "${{") && strings.HasSuffix(val, "}}")) for earlier error detection and better user experience.

This issue also appears on line 141 of the same file.

		if strings.HasPrefix(draftVal, "${{") {
			// Expression value - embed unquoted so GitHub Actions evaluates it
			customEnvVars = append(customEnvVars, fmt.Sprintf("          GH_AW_PR_DRAFT: %s\n", draftVal))

pkg/workflow/create_pull_request.go:142

  • Same as the draft field above: consider validating that expressions are properly closed with }} for consistency and better error detection.
		if strings.HasPrefix(faiVal, "${{") {
			customEnvVars = append(customEnvVars, fmt.Sprintf("          GH_AW_PR_FALLBACK_AS_ISSUE: %s\n", faiVal))

pkg/workflow/create_discussion.go:150

  • Consider validating that expressions are properly closed with }} for consistency with other expression handling and better error detection.
		if strings.HasPrefix(*ftiVal, "${{") {
			customEnvVars = append(customEnvVars, fmt.Sprintf("          GH_AW_DISCUSSION_FALLBACK_TO_ISSUE: %s\n", *ftiVal))

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan
Copy link
Contributor

You could introduce a templatable boolean type in the main json schema so you can easily assign this templatable boolean to fields. @copilot

Introduce a reusable `templatable_boolean` definition in the `$defs`
section of the main workflow schema. The type captures the "either a
literal boolean or a GitHub Actions expression string" pattern that is
common to templatable safe-output config fields.

Replace the three duplicate inline oneOf patterns for `draft`,
`fallback-as-issue`, and `fallback-to-issue` with
`allOf: [{"$ref": "#/$defs/templatable_boolean"}]` so that adding
the same behaviour to future fields requires only a one-liner $ref.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

You could introduce a templatable boolean type in the main json schema so you can easily assign this templatable boolean to fields. @copilot

Done in ff432b1. Added templatable_boolean to $defs in the main schema:

"templatable_boolean": {
  "description": "A boolean value that may also be specified as a GitHub Actions expression string...",
  "oneOf": [
    { "type": "boolean" },
    { "type": "string", "description": "GitHub Actions expression that resolves to a boolean at runtime" }
  ]
}

The three existing fields now reference it via allOf: [{"$ref": "#/$defs/templatable_boolean"}] (JSON Schema draft-07 requires allOf wrapping since direct $ref ignores sibling keywords like description and default). Future fields can use the same one-liner.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -d 168.63.129.16 ache/go/1.25.0/xgit-upload-pack &#39;origin&#39; --no�� --noprofile 53 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ACCEPT (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -buildtags erignore node js/f�� te &#39;../../../**/*.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettieriggit ls /opt/hostedtoolcache/node/24.13.0/x64/bin/node /var/log -tests /usr/bin/git node (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha get --local 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ules/.bin/sh --noprofile tmain.go ache/go/1.25.0/x--show-toplevel git _har�� */*.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ache/go/1.25.0/x64/pkg/tool/linux_amd64/link ache/node/24.13.0/x64/bin/node 868296/b408/strigit /tmp/go-build498rev-parse 868296/b408/impo--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha _workflow_schema.json 4 /usr/bin/git d -name bin git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh dumps(schema[&#39;$dgit credential.helperev-parse 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha _.a (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -unreachable=false /tmp/go-build498868296/b046/vet.cfg 868296/b331/vet.cfg (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha 868296/b352/_pkg_.a (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -bool -buildtags 868296/b415/vet.cfg -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x--auto -ato�� -bool -buildtags /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha /tmp/go-build498868296/b123/_pkg_.a -trimpath 868296/b342/vet.cfg -p github.com/githurev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel o2o5wKdQ-OSTfBx3YS/NEbzTRrGx3Hf7l9Ai1Xn/Pc-ZrZrmwep16WSdx2oy de_modules/.bin/sh se 868296/b135/vet.rev-parse _.a git rev-�� &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.pr**/*.json ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 8d519d9/node_modules/.bin/node se 868296/b247/vet.rev-parse ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel ache/go/1.25.0/x64/pkg/tool/linu-w tions/setup/node_modules/.bin/sh-buildmode=exe OSTfBx3YS 868296/b105/vet.rev-parse ache/go/1.25.0/x--show-toplevel git rev-�� &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.pr**/*.json ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ache/node/24.13.0/x64/bin/node se tmain.go ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 0/x64/bin/node Hm-T60vWh 868296/b081/vet.rev-parse ache/go/1.25.0/x--show-toplevel git 0/x6�� --show-toplevel rtcfg ache/node/24.13.0/x64/bin/node g/logger/doc.go g/logger/error_frev-parse ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha tmp/TestGetNpmBinPathSetup_GorootOrdering1126280647/001/go/1.25.0/x64&#34;; export PATH=&#34;$(find &#34;/tmsh x_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build498868296/b386/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil_test.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha .json x_amd64/vet de (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot the parser helper should enforce that the template Boolean value is a Boolean or a string starting with ${{ . Don't allow free form string literals. Update the JSON type with pattern constraints.

- JSON schema: add pattern `^\$\{\{.*\}\}$` to the string branch of the
  new `templatable_boolean` $defs type so that only valid GitHub Actions
  expressions are accepted; free-form strings are rejected by validation.

- Go helper: `preprocessBoolFieldAsString` now returns an error when the
  field value is a string that does not match the `${{ ... }}` form
  (must both start with `${{` and end with `}}`).  Callers in
  `create_discussion.go` and `create_pull_request.go` log the error and
  return nil, triggering the safe fallback behaviour.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot the parser helper should enforce that the template Boolean value is a Boolean or a string starting with ${{ . Don't allow free form string literals. Update the JSON type with pattern constrai...

Done in 1936c82.

Schema — added "pattern": "^\\$\\{\\{.*\\}\\}$" to the string branch of templatable_boolean, so the JSON schema validator rejects anything that is not a literal boolean or a well-formed ${{ ... }} expression.

Go helperpreprocessBoolFieldAsString now returns an error when the field value is a string that doesn't both start with ${{ and end with }}. Callers (parsePullRequestsConfig, parseDiscussionsConfig) propagate the error by logging and returning nil, triggering the safe fallback path.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -buildtags /usr/bin/git .github/aw/actiogit-upload-pack &#39;origin&#39; js/f�� 8d2d6fa0ff305816ee2a88e4:pkg/parser/schemas/main_workflow_schema.json git /home/node_modules/.bin/node ./../.prettieriggit -tests /usr/bin/git node (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel ortcfg tions/setup/node_modules/.bin/node g/workflow/featugit g/workflow/imporrev-parse ache/go/1.25.0/x--show-toplevel git tion�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet son blob ff432b17488b34fbrev-parse /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha parseDiscussion e_discussion.go x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node in::/usr/local/bgit .cfg 64/pkg/tool/linu--show-toplevel git ance�� --verify --quiet 0/x64/bin/node t-expression-hangit .cfg kflow.test git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha pkg/mod/github.com/stretchr/testify@v1.11.1/require/doc.go pkg/mod/github.com/stretchr/testify@v1.11.1/require/forward_requirements.go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha kflow/templatables.go ache/go/1.25.0/x64/pkg/tool/linumain ndor/bin/sh get --local .cfg git rev-�� */*.ts&#39; &#39;**/*.json&#39; --ignore-patgo1.25.0 ache/go/1.25.0/x64/pkg/tool/linu-c=4 tions/setup/js/node_modules/.bin-nolocalimports se 6217038/b207/vetrev-parse ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build4126217038/b043/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha h ../../../.prettierignore x_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha kflow/templatables.go ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git se 6217038/b004/vetrev-parse .cfg git rev-�� */*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet h se 6217038/b211/vetrev-parse ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha kflow/templatables.go ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git se 6217038/b005/vetrev-parse .cfg git rev-�� */*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ules/.bin/sh se 6217038/b208/vetrev-parse ache/go/1.25.0/x--show-toplevel infocmp (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha kflow/templatables.go ache/go/1.25.0/x64/pkg/tool/linu-w /usr/bin/git se 6217038/b038/vetrev-parse .cfg git rev-�� */*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet tions/node_modules/.bin/sh se 6217038/b201/vetrev-parse ache/go/1.25.0/x--show-toplevel infocmp (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel x_amd64/vet modules/@npmcli/run-script/lib/node-gyp-bin/node n&#39; &amp;&amp; echo &#34;$PATnode (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git n:&#39; &amp;&amp; echo &#34;$PAnode (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot create pull request fallback as issue cannot be templetable because it modifies the generated .lock.yml file. Must be Boolean

…able)

fallback-as-issue controls whether issues:write permission is included in
the generated .lock.yml at compile time, so it cannot be a runtime
expression. Reverted from *string back to *bool.

- FallbackAsIssue *string → *bool in CreatePullRequestsConfig
- getFallbackAsIssue simplified back to plain bool dereference
- Removed preprocessBoolFieldAsString call for fallback-as-issue
- GH_AW_PR_FALLBACK_AS_ISSUE env var uses simple %t formatting
- AddTemplatableBool → AddBoolPtr for fallback_as_issue in config builder
- Schema: fallback-as-issue reverted to {type: boolean}
- Tests updated to use boolPtr(false) instead of strPtr("false")

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot create pull request fallback as issue cannot be templetable because it modifies the generated .lock.yml file. Must be Boolean

Done in 5e06842. FallbackAsIssue is back to *bool — since it drives the compile-time issues:write permission decision in the generated .lock.yml, it cannot be a runtime expression. The schema fallback-as-issue is now {type: boolean} again, and all callers (getFallbackAsIssue, AddBoolPtr, env var generation) use the plain bool type.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw g/parser/schemas-c x_amd64/vet git /pre�� ]*:[[:space:]]*&#34;(create_pull_request|push_to_pull_request_branch)&#34; x_amd64/vet /home/REDACTED/go/bin/node (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw g/workflow/compi-c x_amd64/vet gh er /repos/actions/setup-node/git/ref/tags/v4 --jq /usr/bin/bash .version=1936c82docker (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha k/gh-aw/gh-aw/.github/workflows **/*.cjs /home/REDACTED/work/gh-aw/gh-aw/node_modules/.bin/node **/*.json --ignore-path ed } } node /hom�� k/gh-aw/gh-aw/.github/workflows ../../../**/*.json /usr/bin/unpigz l ../../../.prettirev-parse ed } } /usr/bin/unpigz (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha js/**/*.json&#39; --remote.origin.url x_amd64/compile /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ache/node/24.13.0/x64/bin/node -unreachable=falgit /tmp/go-build260rev-parse /opt/hostedtoolc--show-toplevel node ntic�� (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha successfully&#34; (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha .egg ame 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -unreachable=false /tmp/go-build2601437836/b019/vet.cfg 1437836/b295/vet.cfg (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha scripts synced successfully&#34; .cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet pull.rebase (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build2601437836/b084/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha js/**/*.json&#39; --ignore-path ../../../.prettierignore --package-lock-only /usr/bin/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel x_amd64/compile /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha .egg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha nc strPtr k/gh-aw/gh-aw/pkg/workflow/ 1437836/b286/vet.cfg (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha kflow/safe_outputs_permissions_t-s git /usr/bin/sh --show-toplevel (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git nner/work/gh-aw/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha ignore-path ../../../.prettierignore nly /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet $name) { hasDiscussionsEnabled } } (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha .version=1936c82-dirty&#34; -o gh-aw-p (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha kflow/safe_outputs_permissions_t-p git /usr/local/bin/sh --show-toplevel (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha ignore-path ../../../.prettierignore x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet modules/@npmcli/run-script/lib/node-gyp-bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha new-feature.txt 64/pkg/tool/linux_amd64/vet 0/x64/bin/node get --local ash git rev-�� ./../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore git 0/x64/bin/node --local credential.helpe-d .cfg git (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node &amp; echo &#34;$PATH&#34; .cfg 64/pkg/tool/linugraphql git ode_�� --count ..feature-branchowner=github node get --local ache/go/1.25.0/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node bin:::/usr/localgit .cfg 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git ode_�� origin/main feature-branch r: $owner, name: $name) { hasDiscussionsEnabled } } get --local ache/go/1.25.0/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node in&#39; &amp;&amp; echo &#34;$PAgh .cfg 64/pkg/tool/linu/repos/githubnext/agentics/git/ref/tags/# ls ance�� /tmp/gh-aw/aw-feature-branch.patch 64/pkg/tool/linux_amd64/vet 0/x64/bin/node get --local ache/go/1.25.0/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet ules/.bin/sh (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node 8fl6aaGAo .cfg 64/pkg/tool/linugraphql /usr/lib/git-cor-f main�� th .prettierigno-f --auto 0/x64/bin/node --detach .cfg ache/go/1.25.0/x-c git (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node in:::/usr/local//usr/bin/gh .cfg 64/pkg/tool/linugraphql /bin/sh ode_�� git-upload-pack -f git-upload-pack owner=github ode_modules/.bin-f get --local ache/go/1.25.0/xgraphql git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet 0/x64/bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha --show-toplevel x_amd64/vet er (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 64/bin/node path.sh&#39; &#39;:::&#39; &amp;git 1437836/b194/vet-C ache/go/1.25.0/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git tion�� --show-toplevel ache/go/1.25.0/x..feature-branchowner=github de_modules/.bin/node --noprofile (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha ature-branch.patch x_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 0/x64/bin/npx path.sh&#39; &#39;/usr/bgit 1437836/b197/vet-C ache/go/1.25.0/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git _cod�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet bin/node --noprofile (http block)

If you need me to access, download, or install something from one of these locations, you can either:

const maxCount = config.max || 10;
const expiresHours = config.expires ? parseInt(String(config.expires), 10) : 0;
const fallbackToIssue = config.fallback_to_issue !== false; // Default to true
const fallbackToIssue = parseBoolTemplatable(config.fallback_to_issue, true); // Default to true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot make sure fallabackToIssue is back to a Boolean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 804ee83. fallbackToIssue in create_discussion.cjs now uses config.fallback_to_issue !== false (plain boolean), and FallbackToIssue in Go is back to *bool.

const { defaultTargetRepo, allowedRepos } = resolveTargetRepoConfig(config);
const includeFooter = config.footer !== false; // Default to true (include footer)
const fallbackAsIssue = config.fallback_as_issue !== false; // Default to true (fallback enabled)
const fallbackAsIssue = parseBoolTemplatable(config.fallback_as_issue, true); // Default to true (fallback enabled)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Boolean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 804ee83. fallbackAsIssue in create_pull_request.cjs now uses config.fallback_as_issue !== false (plain boolean, matching the static *bool on the Go side).

Both fallback fields are compile-time / non-templatable config, not
runtime expressions. Revert JS handlers to simple !== false evaluation
and Go struct back to *bool.

- create_discussion.cjs: use config.fallback_to_issue !== false, remove parseBoolTemplatable import
- create_pull_request.cjs: use config.fallback_as_issue !== false
- CreateDiscussionsConfig.FallbackToIssue *string → *bool
- Removed preprocessBoolFieldAsString for fallback-to-issue
- GH_AW_DISCUSSION_FALLBACK_TO_ISSUE env var uses %t formatting
- AddTemplatableBool → AddBoolPtr for fallback_to_issue in compiler
- Schema: fallback-to-issue reverted to {type: boolean}
- Tests updated to use boolPtr()

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw /opt/hostedtoolc-c /usr/bin/git git _out�� --show-toplevel git /usr/bin/git --show-toplevel /opt/hostedtoolcrev-parse /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha ache/go/1.25.0/x--show-toplevel git 0/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse 64/pkg/tool/linu--show-toplevel git arne�� --show-toplevel 64/pkg/tool/linux_amd64/link /usr/bin/git low.test ache/go/1.25.0/xrev-parse tcfg.link git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha js/**/*.json&#39; --ignore-path ../../../.prettierignore git /usr/bin/git --show-toplevel git 0/x64/bin/node git rev-�� --show-toplevel infocmp /usr/bin/grep xterm-color git 0/x64/bin/node grep (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git /bin:&#39; &amp;&amp; echo &#34;git x_amd64/vet /usr/bin/git git s --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/lib/git-core/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha get --local cfg credential.usernbash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build914359871/b046/vet.cfg 359871/b332/vet.cfg (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git 0/x64/bin/node git rev-�� --show-toplevel git /usr/bin/git user.email test@example.comapi 0/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha nner/work/gh-aw/gh-aw/actions/setup/sh/sanitize_path.sh&#39; &#39;:::/usr/bin:/usr/local/bin&#39; &amp;&amp; echo &#34;$node git /usr/bin/git --show-toplevel git /opt/hostedtoolc--write git rev-�� ath ../../../.pr**/*.json node /usr/bin/infocmp../../../.prettierignore install --package-lock-o-c /usr/bin/git infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha nner/work/gh-aw/gh-aw/actions/setup/sh/sanitize_-f git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� ath ../../../.prOUTPUT git /usr/bin/infocmp168.63.129.16 --show-toplevel git /usr/bin/git infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel cut _modules/.bin/sh ache/go/1.25.0/xgit git 0/x64/bin/node git bran�� on&#39; --ignore-path ../../../.prettierignore git 0/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -x c /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet - (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha --show-toplevel /bin/sh sh git-upload-pack /usr/bin/gh git-upload-pack api 0/x64/bin/node git add on&#39; --ignore-pat-f git 0/x64/bin/node --show-toplevel git /usr/bin/infocmpxterm-color git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha nner/work/gh-aw/gh-aw/pkg/parser-s (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha xterm-color 64/pkg/tool/linux_amd64/compile /usr/bin/git _.a t-expression-hanrev-parse 64/pkg/tool/linu--show-toplevel git comm�� -m Initial commit 0/x64/bin/node 8fl6aaGAo cfg 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --verify --quiet 0/x64/bin/node git init�� kflow.test git 0/x64/bin/node --show-toplevel kflow.test 0/x64/bin/bash git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha --show-toplevel git $name) { hasDiscussionsEnabled } } --show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha --show-toplevel bash $name) { hasDiscussionsEnabled } } source &#39;/home/ru/usr/lib/systemd/systemd-executor git /usr/bin/git node /opt�� js/**/*.json&#39; ----log-target --package-lock-oauto /usr/bin/git --show-toplevel git 0/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha ignore-path ../../../.prettierignore git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel git modules/@npmcli/run-script/lib/node-gyp-bin/sh ature-branch.patsh git /usr/bin/git git runs�� h ../../../.prettierignore git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel sed /usr/bin/basename (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha ignore-path ../../../.prettierignore git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git n:::&#39; &amp;&amp; echo &#34;$node git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --show-toplevel git e/git --show-toplevel git /usr/bin/git e/git rev-�� h ../../../.prettierignore git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --show-toplevel j2/wDkfqk1wO9BU1owner=github r: $owner, name:-f in::/usr/local/binfocmp git 0/x64/bin/node git ance�� --verify --quiet 0/x64/bin/node --show-toplevel git 64/pkg/tool/linuinspect git (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel sed $name) { hasDiscussionsEnabled } } cfg git 0/x64/bin/node git conf�� user.email test@example.com 0/x64/bin/node --show-toplevel 64/pkg/tool/linu-C 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel head /usr/bin/git /tmp/gh-aw/aw-fegit git 0/x64/bin/node git rev-�� on&#39; --ignore-path ../../../.pret.prettierignore git es/.bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel tr $name) { hasDiscussionsEnabled } } [:lower:] git 0/x64/bin/node git desc�� --exact-match --tags 0/x64/bin/node --show-toplevel git 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel grep sh ^From [0-9a-f]\{/usr/bin/gh /tmp/gh-aw/aw-feapi 0/x64/bin/node git stat�� on&#39; --ignore-pat-f git ode_modules/.bin-f --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha /repos/actions/aremote.origin.url --jq ode_modules/.bin/sh ache/go/1.25.0/x/usr/bin/gh git 0/x64/bin/node git add on&#39; --ignore-pat-f git 0/x64/bin/node --show-toplevel 64/pkg/tool/linu-1 /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git --count ..feature-branchapi 0/x64/bin/node git comm�� on&#39; --ignore-pat-f Update initial fowner=github 0/x64/bin/node --show-toplevel git ndor/bin/bash git (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha tags/v5 git _modules/.bin/sh --verify --quiet 0/x64/bin/node /usr/lib/git-correv-parse main�� on&#39; --ignore-path ../../../.prettierignore --auto 0/x64/bin/node --detach low.test 0/x64/bin/bash git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel ls $name) { hasDiscussionsEnabled } } /tmp/gh-aw/aw-fegit git 0/x64/bin/node bash /tmp�� on&#39; --ignore-path ../../../.prettierignore git 0/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel sed /usr/bin/git s/.*&#34;branch&#34;[[:sgit git 0/x64/bin/node git rev-�� --show-toplevel git 0/x64/bin/node --show-toplevel 64/pkg/tool/linu-C 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/lib/git-core/git origin/main feature-branch 0/x64/bin/node /usr/lib/git-correv-parse main�� on&#39; --ignore-path ../../../.prettierignore --auto 0/x64/bin/node --detach git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha ath ../../../.pr**/*.json git /usr/bin/git tags/v4 git /usr/bin/git git er --show-toplevel git /usr/bin/git --show-toplevel tr /usr/bin/wc git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel y4o5Db9Wpn4m /usr/bin/git PATH&#34; (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha --show-toplevel bash /opt/hostedtoolcache/node/24.13.0/x64/bin/npm source &#39;/home/rugit /usr/lib/git-correv-parse x_amd64/compile /opt/hostedtoolcache/node/24.13.0/x64/bin/npm inst�� js/**/*.json&#39; --ignore-path ../../../.prettierignore x_amd64/compile /usr/bin/git --show-toplevel git 0/x64/bin/node git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title fix: preserve expression-based boolean values in create-pull-request and create-discussion handler configs fix: preserve expression-based draft boolean in create-pull-request handler config Feb 22, 2026
@pelikhan pelikhan merged commit fdcb119 into main Feb 22, 2026
48 checks passed
@pelikhan pelikhan deleted the copilot/fix-draft-expression-handler-config branch February 22, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create-pull-request draft expression is dropped from handler config

2 participants