-
Notifications
You must be signed in to change notification settings - Fork 347
fix: pass GITHUB_SERVER_URL to DIFC proxy container for GHEC support #23308
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -299,6 +299,7 @@ func TestGenerateStartDIFCProxyStep(t *testing.T) { | |||||
| require.NotEmpty(t, result, "should generate proxy start step") | ||||||
| assert.Contains(t, result, "Start DIFC proxy for pre-agent gh calls", "step name should be present") | ||||||
| assert.Contains(t, result, "GH_TOKEN:", "step should include GH_TOKEN env var") | ||||||
| assert.Contains(t, result, "GITHUB_SERVER_URL:", "step should include GITHUB_SERVER_URL env var") | ||||||
|
||||||
| assert.Contains(t, result, "GITHUB_SERVER_URL:", "step should include GITHUB_SERVER_URL env var") | |
| assert.Contains(t, result, "GITHUB_SERVER_URL: ${{ github.server_url }}", "step should propagate github.server_url env var") |
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.
docker run -e GITHUB_SERVER_URLwill pass an empty value into the container when the host env var is unset (Docker treats-e VARasVAR=if not defined). If this script is ever run outside the generated Actions step (or ifGITHUB_SERVER_URLis missing), consider defaulting it tohttps://github.bokerqi.topor only including the-eflag when non-empty to avoid an explicit empty value affecting proxy routing.