fix: add missing repository selector to DefaultBranch resource#232
Open
jackivanov wants to merge 1 commit intocrossplane-contrib:mainfrom
Open
fix: add missing repository selector to DefaultBranch resource#232jackivanov wants to merge 1 commit intocrossplane-contrib:mainfrom
jackivanov wants to merge 1 commit intocrossplane-contrib:mainfrom
Conversation
The DefaultBranch resource was missing repository field, repositoryRef, and repositorySelector due to incorrect external name configuration. Changed from config.TemplatedStringAsIdentifier to config.IdentifierFromProvider to match the pattern used by other repository-related resources. This change: - Adds repository field for direct repository name input - Adds repositoryRef for cross-resource references - Adds repositorySelector for label-based repository selection - Maintains backward compatibility with existing resources - Follows the established pattern used by other repo resources Fixes crossplane-contrib#84 Signed-off-by: Jack Ivanov <17044561+jackivanov@users.noreply.github.com>
35d133a to
6ca9efe
Compare
Contributor
Author
|
Hi @AtzeDeVries, Could you please review, merge, and release a new version? We rely on this resource in our enterprise. Much appreciated. |
Contributor
Author
|
Sorry for pinging you @pravindahal @xunholy. Highly appreciate if you can review, merge and release. Thanks! |
AtzeDeVries
reviewed
Oct 7, 2025
| "github_branch": config.IdentifierFromProvider, | ||
| // Imported by using the following format: {{ repository }} | ||
| "github_branch_default": config.TemplatedStringAsIdentifier("repository", "{{ .external_name }}"), | ||
| "github_branch_default": config.IdentifierFromProvider, |
Collaborator
There was a problem hiding this comment.
@jackivanov let me verify this, but i believe this might be a breaking change.
First of all, if the format of the external does not change then this is ok.
If the format of the external name changes then this will change how the provider interprets the external name on current resources. I am not aware of upjet beging able to handle this, but could be
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.
Description of your changes
The DefaultBranch resource was missing repository field, repositoryRef, and repositorySelector due to incorrect external name configuration. Changed from config.TemplatedStringAsIdentifier to config.IdentifierFromProvider to match the pattern used by other repository-related resources.
This change:
Fixes #84
I have:
make reviewable testto ensure this PR is ready for review.How has this code been tested