Conversation
The compiled agent job now automatically runs configure_gh_for_ghe.sh before agent execution (injected in #21408). Update the GHES section to reflect that no manual configuration is required for the agent itself; manual sourcing is only needed for custom steps outside the agent sandbox. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…7-5b8df9b8a8a17f4d
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the GHES setup documentation to clarify how gh CLI is configured for agentic workflows and when users need to run the helper script manually.
Changes:
- Renames and rewrites the GHES
ghCLI configuration section to explain automatic configuration in the compiled agent job. - Adds guidance for manually invoking the helper script in custom workflow
steps:outside the agent environment. - Simplifies the final paragraph to focus on where the helper script is installed.
Comments suppressed due to low confidence (1)
docs/src/content/docs/setup/cli.md:92
- The example uses
source /opt/gh-aw/actions/configure_gh_for_ghe.sh, but the script is meant to be executed as a standalone Bash script (it has a shebang, runsmain, and persistsGH_HOSTviaGITHUB_ENV). Usingsourceis Bash-specific and can be confusing in Actions (it won’t carry shell state across steps). Prefer documentingrun: bash /opt/gh-aw/actions/configure_gh_for_ghe.sh(or explicitly setshell: bash) for portability/clarity.
steps:
- name: Configure gh for GHE
run: source /opt/gh-aw/actions/configure_gh_for_ghe.sh
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| #### Configuring `gh` CLI on GHES | ||
|
|
||
| When agentic workflows run on GitHub Enterprise Server and use custom `steps:` that invoke `gh` CLI commands, source the bundled helper script to configure `gh` for the enterprise host: | ||
| The compiled agent job automatically runs `configure_gh_for_ghe.sh` before the agent starts executing. The script detects the GitHub host from the `GITHUB_SERVER_URL` environment variable (set by GitHub Actions on GHES) and configures `gh` to authenticate against it. No configuration is required for the agent to use `gh` CLI commands on your GHES instance. |
| The script is installed to `/opt/gh-aw/actions/configure_gh_for_ghe.sh` by the setup action. | ||
|
|
||
| > [!NOTE] | ||
| > Custom steps run outside the agent firewall sandbox and have access to standard GitHub Actions environment variables including `GITHUB_SERVER_URL`, `GITHUB_TOKEN`, and `GH_TOKEN`. |
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.
Self-Healing Documentation Fixes
This PR was automatically created by the Daily Documentation Healer workflow.
Gaps Fixed
docs/src/content/docs/setup/cli.mddescribedconfigure_gh_for_ghe.shonly as a manual step for customsteps:, but commit Inject GH_HOST configuration step into compiled agent job for GHE Cloud data residency #21408 (merged today) now automatically injects this step into every compiled agent job. The docs now correctly state that no manual configuration is needed for the agent itself, and that only user-defined customsteps:outside the agent sandbox still require the manualsourcecall.Root Cause
DDUw's Step 1b searches only for open documentation issues (
is:open label:documentation). Issue #20968 was closed asnot_plannedon 2026-03-15 before DDUw ran, so DDUw never saw it. Additionally, a related code change (commit #21408, merged today) introduced automatic GHESghCLI configuration in the compiled agent job — but because DDUw's 24-hour window and issue-scan logic were both focused on open issues, neither the deferred issue nor the behavioral change triggered a documentation update.💡 DDUw Improvement Suggestions
DDUw Improvement Suggestions
Step 1b should also scan recently closed documentation issues. DDUw currently only checks
is:open label:documentation. It should additionally run:For each recently closed issue:
[docs]PR references it → potential missed documentation gap; investigate the related code changes.configure_gh_for_ghe.shauto-injection case here).This would have caught issue #20968 and prompted DDUw to look at commit #21408, where the behavioral change needed a doc update.
Related Issues
References: