Skip to content

[docs] Self-healing documentation fixes from issue analysis - 2026-03-17#21437

Merged
pelikhan merged 2 commits intomainfrom
docs/self-healing-ghes-auto-inject-2026-03-17-5b8df9b8a8a17f4d
Mar 17, 2026
Merged

[docs] Self-healing documentation fixes from issue analysis - 2026-03-17#21437
pelikhan merged 2 commits intomainfrom
docs/self-healing-ghes-auto-inject-2026-03-17-5b8df9b8a8a17f4d

Conversation

@github-actions
Copy link
Contributor

Self-Healing Documentation Fixes

This PR was automatically created by the Daily Documentation Healer workflow.

Gaps Fixed

Root Cause

DDUw's Step 1b searches only for open documentation issues (is:open label:documentation). Issue #20968 was closed as not_planned on 2026-03-15 before DDUw ran, so DDUw never saw it. Additionally, a related code change (commit #21408, merged today) introduced automatic GHES gh CLI 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:

repo:$\{\{ github.repository }} is:issue is:closed label:documentation closed:>=YESTERDAY

For each recently closed issue:

  • If closed as completed and no [docs] PR references it → potential missed documentation gap; investigate the related code changes.
  • If closed as not_planned → log as a deferred documentation need; do not auto-create docs, but cross-reference with any related code changes in the same window to detect accidental doc gaps (like the configure_gh_for_ghe.sh auto-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:

Generated by Daily Documentation Healer ·

  • expires on Mar 20, 2026, 7:35 PM UTC

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>
@github-actions github-actions bot added automation documentation Improvements or additions to documentation labels Mar 17, 2026
@pelikhan pelikhan marked this pull request as ready for review March 17, 2026 21:02
Copilot AI review requested due to automatic review settings March 17, 2026 21:02
@pelikhan pelikhan merged commit a6dfd4c into main Mar 17, 2026
2 checks passed
@pelikhan pelikhan deleted the docs/self-healing-ghes-auto-inject-2026-03-17-5b8df9b8a8a17f4d branch March 17, 2026 21:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 gh CLI 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, runs main, and persists GH_HOST via GITHUB_ENV). Using source is Bash-specific and can be confusing in Actions (it won’t carry shell state across steps). Prefer documenting run: bash /opt/gh-aw/actions/configure_gh_for_ghe.sh (or explicitly set shell: 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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GHES: Create prerequisites guide and troubleshooting runbook for Copilot engine

2 participants