File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Elastic.Markdown/IO/Discovery Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public record GitCheckoutInformation
3333 public string ? RepositoryName
3434 {
3535 get => _repositoryName ??= Remote . Split ( '/' ) . Last ( ) ;
36- set => _repositoryName = value ;
36+ init => _repositoryName = value ;
3737 }
3838
3939 // manual read because libgit2sharp is not yet AOT ready
@@ -73,13 +73,15 @@ public static GitCheckoutInformation Create(IFileSystem fileSystem)
7373 using var streamReader = new StreamReader ( stream ) ;
7474 ini . Load ( streamReader ) ;
7575
76- var remote = BranchTrackingRemote ( branch , ini ) ;
76+ var remote = Environment . GetEnvironmentVariable ( "GITHUB_REPOSITORY" ) ;
77+ if ( string . IsNullOrEmpty ( remote ) )
78+ remote = BranchTrackingRemote ( branch , ini ) ;
7779 if ( string . IsNullOrEmpty ( remote ) )
7880 remote = BranchTrackingRemote ( "main" , ini ) ;
7981 if ( string . IsNullOrEmpty ( remote ) )
8082 remote = BranchTrackingRemote ( "master" , ini ) ;
8183 if ( string . IsNullOrEmpty ( remote ) )
82- remote = Environment . GetEnvironmentVariable ( "GITHUB_REPOSITORY" ) ?? "elastic/docs-builder-unknown" ;
84+ remote = "elastic/docs-builder-unknown" ;
8385
8486 remote = remote . AsSpan ( ) . TrimEnd ( ".git" ) . ToString ( ) ;
8587
You can’t perform that action at this time.
0 commit comments