1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Fix gh repo url (#4125)

Co-authored-by: thtri <thanh.hai.trinh@sap.com>
This commit is contained in:
sumeet patil 2022-11-22 22:27:49 +05:30 committed by GitHub
parent f0cb8c6fc2
commit 92d6416d72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ func (g *GitHubActionsConfigProvider) GetCommit() string {
}
func (g *GitHubActionsConfigProvider) GetRepoURL() string {
return getEnv("GITHUB_SERVER_URL", "n/a") + getEnv("GITHUB_REPOSITORY", "n/a")
return getEnv("GITHUB_SERVER_URL", "n/a") + "/" + getEnv("GITHUB_REPOSITORY", "n/a")
}
func (g *GitHubActionsConfigProvider) GetPullRequestConfig() PullRequestConfig {

View File

@ -16,7 +16,7 @@ func TestGitHubActions(t *testing.T) {
os.Setenv("GITHUB_REF", "refs/heads/feat/test-gh-actions")
os.Setenv("GITHUB_RUN_ID", "42")
os.Setenv("GITHUB_SHA", "abcdef42713")
os.Setenv("GITHUB_SERVER_URL", "github.com/")
os.Setenv("GITHUB_SERVER_URL", "github.com")
os.Setenv("GITHUB_REPOSITORY", "foo/bar")
p, _ := NewOrchestratorSpecificConfigProvider()