Skip to content

Commit

Permalink
Update source_code.py to allow self-hosted GitLab for code references (
Browse files Browse the repository at this point in the history
…dagster-io#23160)

## Summary & Motivation

Currently the git [code
reference](https://docs.dagster.io/guides/dagster/code-references#in-any-dagster-environment)
feature only works for URLs containing "gitlab.com" and "github.com".
This doesn't work with self-hosted GitLab because the string
"gitlab.com" is not in "gitlab.self-hosted.xyz".

dagster-io#23135

## How I Tested These Changes

Confirmed locally against self-hosted GitLab instance.
  • Loading branch information
cooperellidge committed Jul 23, 2024
1 parent fc4be1c commit 849e65e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def link_code_references_to_git(
)
)
"""
if "gitlab.com" in git_url:
if "gitlab" in git_url:
git_url = _build_gitlab_url(git_url, git_branch)
elif "github.com" in git_url:
git_url = _build_github_url(git_url, git_branch)
Expand Down

0 comments on commit 849e65e

Please sign in to comment.