Repository navigation
Enable AL-Go for GitHub on GitHub Enterprise Cloud with data residency - #2309
Freddy Kristiansen (freddydk) wants to merge 39 commits into
Conversation
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Pull request overview
Enables AL-Go templates and actions to operate on GitHub Enterprise Cloud data-residency hosts.
Changes:
- Replaces hardcoded GitHub URLs with runtime server/API URLs.
- Updates release uploads, dependency retrieval, and template downloads for enterprise hosts.
- Adds enterprise documentation, release notes, safeguards, and regression fixes.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
Tests/DownloadProjectDependencies.Test.ps1 |
Tests URL secrets. |
Tests/Deploy.Module.Test.ps1 |
Configures API URL in tests. |
Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml |
Makes release operations host-aware. |
Templates/Per Tenant Extension/.AL-Go/localDevEnv.ps1 |
Clarifies GitHub CLI authentication. |
Templates/AppSource App/.github/workflows/CreateRelease.yaml |
Makes release operations host-aware. |
Templates/AppSource App/.AL-Go/localDevEnv.ps1 |
Clarifies GitHub CLI authentication. |
Scenarios/UsingGitHubEnterprise.md |
Adds enterprise setup guidance. |
RELEASENOTES.md |
Announces enterprise compatibility. |
README.md |
Links the enterprise guide. |
Actions/WorkflowPostProcess/WorkflowPostProcess.ps1 |
Targets the active GitHub CLI host. |
Actions/VerifyPRChanges/VerifyPRChanges.ps1 |
Uses the runtime API URL. |
Actions/PullRequestStatusCheck/PullRequestStatusCheck.ps1 |
Targets the runtime GitHub host. |
Actions/Github-Helper.psm1 |
Derives dependency API hosts. |
Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.psm1 |
Uses host-aware API and run URLs. |
Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.ps1 |
Produces host-aware links. |
Actions/DownloadProjectDependencies/DownloadProjectDependencies.psm1 |
Resolves whole-URL secrets. |
Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 |
Initializes empty project metadata. |
Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.Action.ps1 |
Emits host-aware build links. |
Actions/Deploy/Deploy.psm1 |
Uses the runtime API URL. |
Actions/Deliver/Deliver.ps1 |
Handles package lookup failures. |
Actions/CheckForUpdates/CheckForUpdates.ps1 |
Configures the GitHub CLI host. |
Actions/CheckForUpdates/CheckForUpdates.HelperFunctions.ps1 |
Adds host-aware template downloads. |
Actions/AL-Go-Helper.ps1 |
Updates defaults and dependency URLs. |
.github/workflows/CI.yaml |
Restricts AL-Go development CI to GitHub.com. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
We are waiting for this! Having data residency for our codebase is paramount for us and our customers, so we need GitHub Enterprise. Without proper support from AL-Go, we can't move to GHE. |
|
We've been running AL-Go on GHE with these changes for a couple of months. Would love to see this officially adopted. |
|
We are really waiting for this, using ghe is non-negotiable for us, and having to rely on a fork is far from ideal. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Cross-host credentials, local dependency URLs, and the GHE action bootstrap path remain incomplete.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 3
Open (4)
Resolved since last review (1)
|
Freddy Kristiansen (@freddydk) Thank you for your contribution! We are excited for AL-Go to support GHE. However, we are currently unable to test your solution properly and, while we figure out the setup, the feature has to marked as "preview" or "experimental". |
|
@microsoft-github-policy-service agree |
| ### Include agentic workflows when updating system files from AL-Go or indirect templates | ||
|
|
||
| Update AL-Go System Files will now also include .md files from .github/workflows. This is the recommended location for storing agentic workflows (.md files). |
There was a problem hiding this comment.
let's make this a separate effort? Doesn't really seem related to GitHub enterprise support
There was a problem hiding this comment.
Correct, but the people using this will be broken if I remove it...
Will try to figure out what I can do - maybe create another branch they can use and then remove it from here.
| # Using AL-Go for GitHub on GitHub Enterprise (GHE) | ||
|
|
||
| Repositories using AL-Go for GitHub are supported on **GitHub Enterprise Cloud with data residency** (also known as **GHE**, where your enterprise lives on a dedicated host like `https://<enterprise>.ghe.com`). |
There was a problem hiding this comment.
You could add a note in here that this is in preview (same way you did in the releasenotes)
There was a problem hiding this comment.
will do
| > [!NOTE] | ||
| > The mirror-clone in step 2 reads from the **public** `github.com` template, which does not require authentication. Step 3 and step 4 target your enterprise host, using the credentials you authenticated with in step 1. | ||
|
|
||
| ## Automated approach |
There was a problem hiding this comment.
While this tool sounds very useful, I am not sure we are allowed to / should reference third-party tools in our docs like this.
Could we document it just with the manual steps for now?
There was a problem hiding this comment.
Sure - will fix this - I will add a blog post about the tool then, no problem.
| } | ||
| } | ||
| $dependency | Add-Member -name "AuthTokenSecret" -MemberType NoteProperty -Value $token | ||
| $dependency | Add-Member -name "AuthTokenSecret" -MemberType NoteProperty -Value $useToken |
| Write-Host "Checking PR Build status for run $RunId in repository $Repository" | ||
|
|
||
| $workflowJobs = Invoke-CommandWithRetry -RetryCount 5 -FirstDelay 5 -MaxWaitBetweenRetries 60 -ScriptBlock { | ||
| $env:GH_HOST = ([Uri]$env:GITHUB_SERVER_URL).Host |
| # Initialize in case no projects are found | ||
| $projectBuildInfo = @{ projectDependencies = @{} } |
|
Closing this as it is being split in two PRs, where the data residency is here: #2407 |



❔What, Why & How
This pull request introduces comprehensive updates to improve compatibility with GitHub Enterprise (GHE) hosts. The main focus is to ensure that all scripts and workflows dynamically use the correct GitHub server and API URLs, rather than hardcoding references to
github.comandapi.github.com. This enables repositories using AL-Go for GitHub to work seamlessly on both public GitHub and GHE instances. Additionally, documentation has been updated to clarify support and provide guidance for GHE users.GitHub Enterprise compatibility and dynamic host resolution:
GITHUB_SERVER_URLandGITHUB_API_URLenvironment variables instead of hardcodedgithub.comandapi.github.comURLs for REST API calls and repository links. This affects actions such as dependency probing, deployments, pull request validation, and workflow post-processing. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]github.com, preventing unsupported usage on GHE for the main repo.ghCLI commands set theGH_HOSTenvironment variable to ensure API calls target the correct host on GHE. [1] [2] [3]Documentation and user guidance:
Scenarios/UsingGitHubEnterprise.md, detailing how to use AL-Go for GitHub on GHE, including setup instructions and best practices.README.mdis updated to reference the new GHE usage guide.Other improvements and fixes:
These changes ensure that AL-Go for GitHub works reliably in both public and enterprise GitHub environments, with clear documentation and robust host detection.
This functionality was sponsored by Fellowmind, Sweden.