Fix corrupted dependency versions caused by release workflow sed patterns#92
Merged
brunoborges merged 2 commits intomainfrom Apr 23, 2026
Merged
Conversation
1 task
…java-preview.N format Agent-Logs-Url: https://github.com/github/copilot-sdk-java/sessions/f0073ec1-6192-4879-953c-26576dbb61b6 Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix jbang-example.java with wrong dependency version
Fix corrupted dependency versions caused by release workflow sed patterns
Apr 23, 2026
edburns
approved these changes
Apr 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the release workflow’s version-matching logic so it correctly handles -java-preview.N qualifiers, and repairs documentation/examples that were previously corrupted by incomplete sed patterns. This aligns the Java SDK release automation with the project’s supported version formats while keeping docs and examples consistent for users.
Changes:
- Correct corrupted
copilot-sdk-javaversion strings in README, JBang example, and cookbook pages. - Update
.github/workflows/publish-maven.ymlregexes to accept and rewriteM.M.P-java-preview.Nversions (validation, tag filtering, and doc updatesedpatterns). - Refresh README Maven/Gradle snippets to the intended released version (
0.3.0-java-preview.1).
Show a summary per file
| File | Description |
|---|---|
.github/workflows/publish-maven.yml |
Expands version validation/tag filtering and doc-update sed patterns to support -java-preview.N without corrupting strings. |
README.md |
Fixes Maven/Gradle dependency examples to a non-corrupted, current preview version. |
jbang-example.java |
Fixes the //DEPS coordinate to the intended preview version. |
src/site/markdown/cookbook/pr-visualization.md |
Fixes corrupted //DEPS version in the example. |
src/site/markdown/cookbook/persisting-sessions.md |
Fixes corrupted //DEPS versions across multiple code blocks. |
src/site/markdown/cookbook/multiple-sessions.md |
Fixes corrupted //DEPS versions in the examples. |
src/site/markdown/cookbook/managing-local-files.md |
Fixes corrupted //DEPS versions across code blocks. |
src/site/markdown/cookbook/error-handling.md |
Fixes corrupted //DEPS versions across all example sections. |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #80
Before the change?
-java.Nversion qualifiers (e.g.,0.2.2-java.1), not-java-preview.N(e.g.,0.3.0-java-preview.0). When updating versions, sed matched only the base0.3.0portion, producing corrupted versions like0.3.0-java-preview.1-java-preview.0acrossjbang-example.java,README.md, and all cookbook markdown files.-java-preview.Nformat.After the change?
0.3.0-java-preview.1across 8 files (jbang-example.java,README.md, 5 cookbook files)README.mdMaven section updated from stale0.3.0-java-preview.0to0.3.0-java-preview.1\(-java\.[0-9][0-9]*\)to\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)— now matches all three formats:M.M.P,M.M.P-java.N,M.M.P-java-preview.N-java-preview.NPull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?