Refactor: Extract duplicate artifact download code into shared helper#1956
Merged
Refactor: Extract duplicate artifact download code into shared helper#1956
Conversation
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove duplicated code for agent output artifact download
Refactor: Extract duplicate artifact download code into shared helper
Oct 18, 2025
pelikhan
reviewed
Oct 18, 2025
| // and set the GITHUB_AW_AGENT_OUTPUT environment variable | ||
| func buildAgentOutputDownloadSteps() []string { | ||
| // ArtifactDownloadConfig holds configuration for building artifact download steps | ||
| type ArtifactDownloadConfig struct { |
Contributor
Author
There was a problem hiding this comment.
Done! Moved ArtifactDownloadConfig and buildArtifactDownloadSteps() to artifacts.go in commit a40cdf6.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
approved these changes
Oct 18, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
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.
Summary
Successfully eliminated duplicate artifact download code and organized it into a dedicated file.
Latest Changes (per code review)
Moved to new file
pkg/workflow/artifacts.go:ArtifactDownloadConfigstructbuildArtifactDownloadSteps()functionKept in
pkg/workflow/safe_output_helpers.go:buildAgentOutputDownloadSteps()wrapper function (specific to safe-outputs)This improves code organization by separating generic artifact download functionality into its own file, making it easier to find and maintain.
Testing
✅ All unit tests pass
✅ Build succeeds
✅ Linter passes
✅ All artifact download functionality still works correctly
Original prompt
Fixes #1955
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.