-
Notifications
You must be signed in to change notification settings - Fork 426
Provide Authorization header when downloading update-job-proxy
#3146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 refactors the authorization header logic for downloading tools from GitHub by extracting common code into a reusable function and applying consistent authorization patterns to both CLI bundle and update-job-proxy downloads.
- Extracts authorization header logic into
getAuthorizationHeaderForfunction inapi-client.ts - Updates the
start-proxyaction to provide authorization headers when downloadingupdate-job-proxy - Refactors existing CodeQL CLI download logic to use the new common function
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/api-client.ts |
Adds new getAuthorizationHeaderFor function to centralize authorization logic |
src/start-proxy-action.ts |
Updates proxy binary download to use authorization headers consistently |
src/setup-codeql.ts |
Refactors to use the new centralized authorization function |
lib/*.js |
Generated JavaScript files reflecting the TypeScript changes |
esbena
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with some minor doc/log thoughts.
This changes the
start-proxyaction to provide anAuthorizationheader for thetoolcache.downloadToolcall under the same circumstances where we provide one for thetoolcache.downloadToolcall when downloading the CLI bundle.Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist