GitHub Enterprise
Integrating with a VCS provider unlocks the ability to use GitOps workflows, import modules, enable Open Policy Agent, and much more.
To enable GitHub Enterprise:
- Go to “Integrations” and select GitHub Enterprise
- Copy the callback URL
- Enter your GitHub Enterprise URL
- Click the “Register a new OAuth application” link, and register a new OAuth app in GitHub.

- Click on “Generate a new client secret" and copy the client ID and client secret:

- Go back to Scalr and paste the values into the fields:
- Application ID
- Secret
- Upon clicking “Create” a redirection back to GitHub occurs to complete the authorization.
Commit Strategy
Admins can choose between the following two commit strategies when adding a VCS provider connection. All workspaces that use this VCS connection will inherit this setting:
Head Commit of the Base Branch: The default base commit strategy compares the latest head commit with the base branch commit
Previous Commit of the PR Branch: The commit compares the latest head commit with the previous head commit
The head commit strategy compares ALL commits in the PR every time a commit is pushed, while the previous commit strategy only compares the new commit to the previous commit that was made.

Pull Request Comments
Scalr provides the option to display run results in the GitHub pull request. The result will be an overall summary of the pull request as well as a per-workspace report showing what resources have been created, updated, or deleted. The cost and OPA results will also be displayed:

Enabling Comments
To be able to see the run summary in a GitHub comment before merging the PR, you must enable this in the GitHub integration:


Execute Runs from Pull Request Comments
To enable the ability to execute runs from pull request comments, you must enable it at the VCS provider integration level:
- Allow triggering plan-only runs from the PR comments: Any user who can comment on the PR can execute a
plan-only
run in Scalr. - Allow triggering plan & apply runs from the PR comments: Any user who can comment on the PR can execute an
apply
run in Scalr.

When enabled, all users who have access to the pull request comment can execute a run. The workspace must have "Enabled VCS-driven dry runs" enabled in the settings for this feature to work.
Draft PRs
Draft pull requests are commonly used during the early development cycles to note when a pull request is in a draft state. Since draft pull requests are so early on in the development cycle, it's possible that you don't want a Scalr plan to execute when pull requests are opened. Scalr gives you the option to ignore draft pull requests by unchecking "Trigger runs for draft pull requests". As of right now, this will apply to any workspace that is linked to the VCS provider.

Automatic Base Branch Merge Before Run Execution
VCS-driven workspaces can automatically merge the base branch into the head branch before triggering a run. This ensures that runs are always executed against the latest code in the base branch, providing more accurate and reliable results. This helps a common pain point where runs could be executed against outdated head branches, potentially leading to false-positive results or failed applies after merging.
To implement this feature, enable the auto-merge option when configuring the VCS provider:

Updated 3 days ago