Make compute-text step lazily inserted only when needed #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The compute-text step was being generated for all workflows regardless of whether
${{ needs.task.outputs.text }}was actually used in the workflow content. This resulted in unnecessary GitHub Actions steps and action files being created.Changes
detectTextOutputUsage()function that scans the markdown content for${{ needs.task.outputs.text }}usagebuildTaskJob()to only include the compute-text step when the text output is actually neededwriteComputeTextAction()to only create the.github/actions/compute-text/action.ymlfile when requiredNeedsTextOutputboolean field toWorkflowDatastruct to track usage across the compilation processBehavior
Before: All workflows generated the compute-text step and action file:
After: Only workflows using
${{ needs.task.outputs.text }}generate the compute-text step:Validation
weekly-research.md,test-codex.md) now correctly skip compute-text generation since they don't use the text output${{ needs.task.outputs.text }}still correctly generate the compute-text step and action fileThis optimization reduces unnecessary GitHub Actions overhead for workflows that don't need contextual text processing.
Fixes #20.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
api.contoso.com/tmp/go-build2408613569/b255/cli.test -test.testlogfile=/tmp/go-build2408613569/b255/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)/tmp/go-build1412393288/b255/cli.test -test.testlogfile=/tmp/go-build1412393288/b255/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)/tmp/go-build3186554237/b255/cli.test -test.testlogfile=/tmp/go-build3186554237/b255/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.