Repository navigation
fix(java): write the Maven POM scm url with https:// - #156
Conversation
publishing.gradle wrote the POM scm url as the bare githubURL value, such as github.com/owner/repo, while the project url on the line above already gets https://. Maven defines scm url as a browsable repository URL, and without a scheme it is not an absolute URL, so tools that link it cannot open it. Prefix it with https:// like the project url.
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would require human review. This PR makes the Maven POM SCM url absolute by prefixing https://, but correctness depends on #155 normalizing githubURL to a bare value; that normalization is not visible in the diff, so the fix and its merge ordering cannot be verified here.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes the generated Maven POM SCM url to be an absolute https URL, building on the githubURL normalization already in place and covered by tests that pin canonical, scheme/www/.git, uppercase, and non-string inputs. The change is bounded, focused, and clearly beneficial.
View guided diff | Turn on auto-fix | Re-trigger cubic
Generator Snapshot Testing
Snapshot results: https://github.com/speakeasy-api/openapi-generation-snapshots/issues/139#issuecomment-6427273221 Snapshot results are summarized above. Additional run context is linked for maintainers with access. |
TristanSpeakEasy
left a comment
There was a problem hiding this comment.
Looks good, using the normalised URL here avoids doubling the scheme and gives scm.url a proper browsable link.
Stacked on #155, which normalizes
githubURLbefore the POM links are written (LocalComputed.GithubURL). Review after #155; this PR will be retargeted once #155 merges.Why
templates/templates/javav2/auxiliary/publishing.gradle.stmplwrites three POM links fromgithubURL. The projecturland the SCMconnectionare complete, but the SCMurlis the bare value:The Maven POM reference defines
<scm><url>as "a publicly browsable repository". Without a scheme it is not an absolute URL, so tools that turn it into a link cannot open it. Publishing is not affected: Maven Central only requires the element to be present.Building on #155 matters here: with the raw value, prefixing
https://would double the scheme for agithubURLsuch ashttps://github.com/acme/acme-java, whose SCMurlis currently correct.What changed
publishing.gradle.stmpl: SCMurlis nowhttps://{{.LocalComputed.GithubURL}}, like the projecturl.zSDKs/sdk-javav2: regenerated withTARGET=review make build-javav2;publishing.gradlechanges only in that line, plus itsgen.lockchecksum.core/javav2patch.Testing
TestJavaPublishingLinksNormalizeGithubURL(from fix(go,mcp,php,java): declare config validation examples and fix the patterns they expose #155) now expectshttps://in the SCMurlfor every case and passes.TARGET=review make build-javav2: passes; the diff is the onescm.urlline and its checksum.cmd/generate -l java -pwithgithubURL: https://github.com/acme/acme-javawriteshttps://github.com/acme/acme-javafor both URLs andscm:git:ssh://git@github.com/acme/acme-java.gitfor the connection.Public-safety check
.claude/skills/public-repo-communication/SKILL.md).git diff --check.