internal/sample: fix SourceInfo
Construct the sample SourceInfo from the given module path, not
the global one.
CI-Result: Cloud Build
@@ -125,7 +125,8 @@ func ModuleInfoReleaseType(modulePath, versionString string) *internal.ModuleInf
ReadmeContents: ReadmeContents,
CommitTime: CommitTime,
VersionType: version.TypeRelease,
- SourceInfo: source.NewGitHubInfo(RepositoryURL, "", ""),
+ // Assume the module path is a GitHub-like repo name.
+ SourceInfo: source.NewGitHubInfo("https://"+modulePath, "", versionString),
IsRedistributable: true,
HasGoMod: true,
}
