feat: add user-agent to both install scripts#8
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
- This PR adds a consistent
cloudsmith-cli-install-scriptUser-Agent to outbound download requests made by both the Unix (install.sh) and Windows (install.ps1) installers, and extends the test fixtures to assert the header is present.
Changes:
- Add a fixed installer User-Agent to
curl/wgetdownloads ininstall.sh. - Add a fixed installer User-Agent to
HttpWebRequestandInvoke-WebRequestdownloads ininstall.ps1. - Extend fixture servers and tests (Bats + Pester) to log and assert
User-Agent: cloudsmith-cli-install-scripton download requests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
install.sh |
Adds User-Agent to curl and wget download paths. |
install.ps1 |
Centralizes secure web request creation and applies User-Agent to downloads. |
tests/install.bats |
Adds assertions that installer downloads identify via User-Agent; updates wget stub parsing. |
tests/Install.Tests.ps1 |
Adds tests validating PowerShell requests include the installer User-Agent. |
tests/helpers/fixture.bash |
Logs request User-Agent in the Unix fixture server. |
tests/helpers/Fixture.psm1 |
Logs request User-Agent in the PowerShell fixture server and exposes LogPath. |
README.md |
Documents that installer download requests use the custom User-Agent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cloudsmith-iduffy
approved these changes
Jul 20, 2026
cloudsmith-iduffy
left a comment
There was a problem hiding this comment.
Might be good to inject some OS information for our own understanding of usage.
If the majority of installs are done via osx or Ubuntu we know it's not the end of the world if we break windows or busybox.
Encodes uname -s/-m (install.sh) and Windows/OSArchitecture (install.ps1) into the download user-agent so usage can be understood by platform.
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
cloudsmith-cli-install-scriptuser agent to both download scripts and add testsType of change