Add java to monorepo: Phase 02: code and test CI.#1348
Open
edburns wants to merge 49 commits into
Open
Conversation
…thub.com/github/cnew file: 80-java-monorepo-add-01-remove-before-merge/20260512-prompts.md - Commence practice of keeping running prompts for sharing and review. new file: 80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md - Document WIP plan for review.
modified: 80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md
modified: 80-java-monorepo-add-01-remove-before-merge/20260513-prompts.md modified: 80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md - WIP Phase 0. .github/workflows/java-publish-maven.yml .github/workflows/java-publish-snapshot.yml - Copy over from `copilot-sdk-java-00`. 80-java-monorepo-add-01-remove-before-merge/ghcpsp-90-gpg-key-archive.sh 80-java-monorepo-add-01-remove-before-merge/ghcpsp-90-gpg-key-import.sh - Durable way to hand off the ability to publish to maven central. Currently resides with @edburns.
Copied from github/copilot-sdk-java: src/, pom.xml, config/, scripts/codegen/, CHANGELOG.md, README.md, jbang-example.java, .lastmerge, docs/adr/, mvnw, mvnw.cmd, .mvn/, .gitignore, test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Since the Java SDK now lives inside the copilot-sdk monorepo, point copilot.sdk.clone.dir at the monorepo root (../) instead of cloning into target/. Remove the antrun git clone execution entirely. Update SCM URLs to github/copilot-sdk. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Revert pom.xml to preserve the git-clone-based test harness setup (copilot.sdk.clone.dir = target/copilot-sdk/) instead of pointing at the monorepo root. Add scripts/codegen/package-lock.json (pins @github/copilot@1.0.49-3) and .gitignore that were missed in the initial file copy.
- Add push path filter (java/**, test/**, workflow, actions) - Remove OS matrix, run on ubuntu-latest only - Set permissions: contents write, checks write, pull-requests write - Use SHA-pinned actions (matching copilot-sdk-java source) - Add persist-credentials: false on checkout - Use .github/actions/setup-copilot for COPILOT_CLI_PATH - Add COPILOT_GITHUB_TOKEN and COPILOT_CLI_PATH env vars to mvn verify - Add JaCoCo badge generation (generate-java-coverage-badge.sh) - Add JaCoCo badge PR creation (peter-evans/create-pull-request) - Add java-test-report composite action for step summary - Upload test results artifact on main branch for site generation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reverts codegen-check.yml to its composition on main (no Java paths). Creates java-codegen-check.yml adapted from the standalone repo's codegen-check.yml with monorepo paths (java/ prefix, working-directory). Updates java-codegen-fix.md to reference java-codegen-check workflow. The java-codegen-fix.lock.yml could not be re-compiled because gh aw is not responsive in this environment. Run 'gh aw compile java-codegen-fix' to regenerate it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace curl|bash gh-aw install with pinned setup action (github/gh-aw@4d44d0e89 v0.73.0, version: v0.68.3) - Add 'git config core.hooksPath .githooks' to enable the repo-root pre-commit hook (runs Spotless on java/src/ changes) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add ignore rules for actions/github-script and github/gh-aw-actions to the github-actions entry (SHAs managed by gh aw compile) - Add ignore for major version bumps on Maven dependencies (may drop Java 17 support or have breaking API changes) - Use dedicated groups for Java: java-maven-deps and java-codegen-deps (separate from the monorepo-wide multi-ecosystem-group) - Give Java entries their own schedule instead of multi-ecosystem-group Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
stephentoub
reviewed
May 20, 2026
stephentoub
reviewed
May 20, 2026
| echo "Reference implementation SDK sync: ${REFERENCE_IMPL_SHORT} (${REFERENCE_IMPL_URL})" | ||
|
|
||
| # Update CHANGELOG.md with release version and Reference implementation sync hash | ||
| ./.github/scripts/release/update-changelog.sh "${VERSION}" "${REFERENCE_IMPL_HASH}" |
Collaborator
Author
There was a problem hiding this comment.
@stephentoub Yes, we have a Java specific CHANGELOG.md: https://github.com/github/copilot-sdk-java/blob/main/CHANGELOG.md and it is updated automatically. We need to decide whether to carry it forward or not, or perhaps to bring the concept to the top level
I'm ok either way. Perhaps it's best to remove the concept for now?
stephentoub
reviewed
May 20, 2026
stephentoub
reviewed
May 20, 2026
stephentoub
reviewed
May 20, 2026
stephentoub
reviewed
May 20, 2026
stephentoub
reviewed
May 20, 2026
stephentoub
reviewed
May 20, 2026
Collaborator
Author
|
I will also turn on the Java/Kotlin CodeQL once this gets merged. |
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.
Implements phase 02 of the plan.
Reviewer Guide
This PR brings the Java SDK into the monorepo and adds the supporting monorepo plumbing needed to build and test it. Publish and regeneration are in a later phase. For review, the easiest path is to split the changes into two buckets.
Successful test runs
Bucket 1: Everything Else
This bucket is the monorepo integration layer around Java. It is mostly repository infrastructure, workflow wiring, automation, and policy.
Follow-up gh aw fixup commits
After the initial Java import, there is a second pass of 12 follow-up commits that fixed gh aw and monorepo workflow problems arising from the upgrade of
gh awto the latest version.Reviewer focus for this follow-up set:
.github/workflows/java-sdk-tests.yml,.github/workflows/codegen-check.yml,.github/workflows/java-codegen-check.yml,.github/workflows/java-codegen-fix.md,.github/workflows/java-codegen-fix.lock.yml,.github/workflows/copilot-setup-steps.yml,.github/aw/actions-lock.json,.github/dependabot.yaml, and.gitignore.Actions and workflow support
.github/actions/java-test-report/action.yml.github/aw/actions-lock.json.github/workflows/copilot-setup-steps.yml.githooks/pre-commit.github/copilot-instructions.md.github/skills/java-coding-skill/SKILL.mdWhat changed here:
java/work like first-class repo content.Codegen and automation outside
java/.github/workflows/codegen-check.yml.github/workflows/java-codegen-check.yml.github/workflows/java-codegen-fix.md.github/workflows/java-codegen-fix.lock.ymlWhat changed here:
Other non-Java workflow and repo changes
.github/dependabot.yaml.gitignoreWhat changed here:
Non-Java workflows that do not start with
java-.github/workflows/copilot-setup-steps.yml.github/workflows/codegen-check.ymlReviewer focus:
Bucket 2: Java-Specific Stuff
This bucket is the actual Java SDK import plus the workflows and scripts that make it behave like a first-class monorepo package.
Java directory import
Top-level Java package files:
java/.lastmergejava/.mvn/wrapper/maven-wrapper.propertiesjava/CHANGELOG.mdjava/README.mdjava/jbang-example.javajava/mvnwjava/mvnw.cmdjava/pom.xmlJava configuration and docs:
java/config/checkstyle/checkstyle.xmljava/config/spotbugs/spotbugs-exclude.xmljava/docs/adr/adr-001-semver-pre-general-availability.mdjava/docs/adr/adr-002-maven-version-and-reference-implementation-tracking.mdJava codegen tooling:
java/scripts/codegen/.gitignorejava/scripts/codegen/java.tsjava/scripts/codegen/package.jsonjava/scripts/codegen/package-lock.jsonJava source and tests:
java/src/main/**java/src/test/**java/src/generated/java/**What changed here:
java/.Java workflows that start with
java-.github/workflows/java-sdk-tests.yml.github/workflows/java-codegen-check.yml.github/workflows/java-codegen-fix.md.github/workflows/java-codegen-fix.lock.yml.github/workflows/java-publish-maven.yml.github/workflows/java-publish-snapshot.ymlNote: the base addition of these files belongs in Bucket 2, but the later gh aw fixup commits that touched
java-sdk-tests.yml,java-codegen-check.yml, andjava-codegen-fix*are called out in Bucket 1 above because they are follow-up workflow plumbing fixes.Java scripts and workflow helpers
.github/scripts/generate-java-coverage-badge.shWhat changed here:
build-test.yml.Reviewer focus inside the Java-specific bucket:
java/pom.xml.github/workflows/java-sdk-tests.ymlcopilot-sdk-java-00/.github/workflows/build-test.ymlwith attention to step ordering and side effects.javadoc:javadocruns.mvn verifyand the required Copilot env vars.main.java/scripts/codegen/*andjava/src/generated/java/**java/src/main/**andjava/src/test/**Suggested Review Order
java/pom.xml.github/workflows/java-sdk-tests.yml.github/workflows/java-*.github/actions/java-test-report/action.ymljava/scripts/codegen/*java/src/generated/java/**(spot-check only)java/src/main/**andjava/src/test/**dependabot, setup steps, hook, skills/instructions)