Repository navigation
Use tags and branches of the main repository for release labels - #102
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change to source release versions from the configured main repository.
No open issues 🎉
What changed in this PR
Corrects release-label version selection for PRs merged outside the main repository. Versions now come from the configured main repository, while issue labels remain applied in the repository where the PR was merged.
Changes:
- Reads branches and tags from
repository.mainRepositoryusing the event’s GitHub client. - Updates tests for separate source and destination repositories, including a cross-repository tag scenario.
- Documents the main repository as the source for release versions.
| File | Description |
|---|---|
src/test/java/org/keycloak/gh/bot/AddReleaseLabelOnMergeTest.java |
Updates client mocks and tests cross-repository release labeling. |
src/main/java/org/keycloak/gh/bot/AddReleaseLabelOnMerge.java |
Uses the configured main repository for branch and tag lookups. |
README.md |
Clarifies which repository determines release versions. |
Review effort: Balanced
stianst
approved these changes
Nov 23, 2026
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.
Follow-up to #98.
The next release label was computed from the branches and tags of the repository the PR was merged in.
The bot is also installed on other repositories, where this produced wrong versions.
Decisions and assumptions:
repository.mainRepository.26.4.18-redhat2are ignored when computing the next version; a test covers this.repository.mainRepositorytokeycloak/keycloakand merge the PRs in the fork.Tested with the bot running against
ahus1/keycloakwithrepository.mainRepository=keycloak/keycloak:release/26.4, closing issue Test upstream tags for release label ahus1/keycloak#475 withbackport/26.4: the issue gotrelease/26.4.19and lostbackport/26.4. The latest plain upstream tag is26.4.18, and26.4.18-redhat2was ignored.main, closing issue Test upstream branches for release label ahus1/keycloak#477 withbackport/main: the issue gotrelease/27.0.0and lostbackport/main. The latest upstream release branch isrelease/26.8.