Conversation
Self-hosted GitLab environments lack ENV0_PR_SOURCE_REPOSITORY and GITLAB_TOKEN. This adds fallbacks so the plugin works out of the box: - Use ENV0_TEMPLATE_REPOSITORY to derive the GitLab API URL when ENV0_PR_SOURCE_REPOSITORY is unavailable - Accept ENV0_VCS_ACCESS_TOKEN as a fallback for GITLAB_TOKEN - Construct a stable MR URL as --ticket-link so Overmind deduplicates changes across multiple plans for the same merge request - Strip trailing .git from repository URLs Made-with: Cursor
tphoney
approved these changes
Mar 9, 2026
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.
Summary
ENV0_TEMPLATE_REPOSITORYwhenENV0_PR_SOURCE_REPOSITORYis unavailable (self-hosted GitLab)ENV0_VCS_ACCESS_TOKENwhenGITLAB_TOKENis not set--ticket-linkso Overmind deduplicates changes across multiple plans for the same merge requestLinear Ticket
ENV0_PR_SOURCE_REPOSITORYandGITLAB_TOKENare not available. This blocks both comment posting and change deduplication.Changes
env0.plugin.yamlStable ticket-link (lines 216-229): After the existing env0 deployment URL construction, an override builds a stable MR URL from
ENV0_PR_SOURCE_REPOSITORY(preferred) orENV0_TEMPLATE_REPOSITORY(fallback) combined withENV0_PR_NUMBER. This applies to all actions (submit-plan,start-change,end-change,get-change) and ensures multiple plans for the same MR update the same Overmind change.GitLab repo + token fallbacks (lines 373-396): Replaced the hard requirements for
ENV0_PR_SOURCE_REPOSITORYandGITLAB_TOKENwith graceful fallbacks toENV0_TEMPLATE_REPOSITORYandENV0_VCS_ACCESS_TOKEN. Added.gitsuffix stripping.GitHub-specific guard (lines 447-450): Moved the
ENV0_PR_SOURCE_REPOSITORYcheck from the common validation path into thegithub)case block only, since GitLab no longer requires it.README.mdENV0_TEMPLATE_REPOSITORYas a GitLab fallbackENV0_VCS_ACCESS_TOKENand theapiscope requirementDeviations from Approved Plan
Implementation matches the approved plan — no material deviations.
Parts 2 and 3 from the plan (GitLab repo fallback and token fallback) were combined into a single edit since they are adjacent in the
gitlab)case block; the logic is identical to what was specified.Made with Cursor