Skip to content

feat: add user-agent to both install scripts#8

Merged
BartoszBlizniak merged 2 commits into
mainfrom
feat/installer-curl-user-agent
Jul 21, 2026
Merged

feat: add user-agent to both install scripts#8
BartoszBlizniak merged 2 commits into
mainfrom
feat/installer-curl-user-agent

Conversation

@BartoszBlizniak

Copy link
Copy Markdown
Member

Summary

  • add cloudsmith-cli-install-script user agent to both download scripts and add tests

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

@BartoszBlizniak
BartoszBlizniak requested a review from a team as a code owner July 20, 2026 15:56
Copilot AI review requested due to automatic review settings July 20, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

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 adds a consistent cloudsmith-cli-install-script User-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/wget downloads in install.sh.
  • Add a fixed installer User-Agent to HttpWebRequest and Invoke-WebRequest downloads in install.ps1.
  • Extend fixture servers and tests (Bats + Pester) to log and assert User-Agent: cloudsmith-cli-install-script on 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.

Comment thread install.sh
Comment thread README.md Outdated

@cloudsmith-iduffy cloudsmith-iduffy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
@BartoszBlizniak
BartoszBlizniak merged commit 37c6618 into main Jul 21, 2026
11 checks passed
@BartoszBlizniak
BartoszBlizniak deleted the feat/installer-curl-user-agent branch July 22, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants