Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 7, 2025

Two issues prevented clean builds: unused function linter errors and JavaScript bundling failures causing test failures.

Changes

Fixed template string bug in maintenance workflow generation

  • Changed from invalid JavaScript template syntax ${getMaintenanceScript()} in Go string literal to proper fmt.Sprintf() with %s placeholder
  • The maintenance workflow now correctly embeds the JavaScript code for closing expired discussions

Added missing embedded script registration

  • Registered expiration_helpers.cjs in pkg/workflow/js.go with //go:embed directive and added to GetJavaScriptSources() map
  • Required by create_issue.cjs, create_discussion.cjs, and create_pull_request.cjs for expiration comment functionality
  • Fixes bundling failures that prevented these scripts from being inlined

Before:

content := `...
  script: |
    ${getMaintenanceScript()}  // Not evaluated in Go string
`

After:

script := getMaintenanceScript()
content := fmt.Sprintf(`...
  script: |
    %s
`, script)

This resolves TestStagedPreviewInlined and TestTrackerIDIntegration test failures caused by incomplete script bundling.

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/user
    • Triggering command: /usr/bin/gh gh api user --jq .login --show-toplevel x_amd64/compile /usr/bin/git wright" --help 64/pkg/tool/linurev-parse x_amd64/compile git rev-�� --show-toplevel x_amd64/compile ache/go/1.25.0/x64/pkg/tool/linujson kflow.test om/actions/cachesecret ortcfg.link ache/go/1.25.0/x--json (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login celain | head -n 10 x_amd64/asm epo om/actions/uploainfocmp om/actions/uploa-1 ache/node/24.11.xterm-color node pars�� .git /usr/lib/git-core/git /usr/bin/infocmp by/959a494a22431infocmp nly in/node infocmp (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login entics.git e/git 97011e184ff34d1d123f3a84c06b0176f7c/log.json om/actions/downlgh om/actions/downlsecret /usr/bin/git 7722907/b329/cli--json e=/t�� t0 git 0s tch ache/go/1.25.0/x-namespace bash gh (http block)

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

Original prompt

Format, lint, fix tests


💡 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.

Copilot AI and others added 3 commits December 7, 2025 19:10
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Fix template string interpolation bug in maintenance_workflow.go
- Add missing expiration_helpers.cjs to embedded scripts in js.go
- All unit tests now passing

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- All workflows recompiled successfully
- Bundler now properly includes expiration_helpers.cjs
- Scripts are being inlined correctly in workflows

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Format and lint code, fix test issues Fix linting errors and bundling failures in JavaScript workflow scripts Dec 7, 2025
Copilot AI requested a review from pelikhan December 7, 2025 19:35
@pelikhan pelikhan marked this pull request as ready for review December 7, 2025 19:41
@pelikhan pelikhan merged commit fee2e9f into main Dec 7, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/format-lint-fix-tests-another-one branch December 7, 2025 19:41
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.

2 participants