Skip to content

Use "get" prefix for configuration attribute getters#328

Merged
cdelmonte-zg merged 1 commit intojenkinsci:masterfrom
laudrup:get-as-prefix-for-configuration-getters
Apr 8, 2024
Merged

Use "get" prefix for configuration attribute getters#328
cdelmonte-zg merged 1 commit intojenkinsci:masterfrom
laudrup:get-as-prefix-for-configuration-getters

Conversation

@laudrup
Copy link
Copy Markdown
Contributor

@laudrup laudrup commented Apr 6, 2024

The configuration-as-code plugin expects a plugins configuration attributes to be accessible with setters prefixed with "set" and getters prefixed with "get" or "is".

Change and add the getters for the configurations attributes that don't follow this convention so this plugin can be fully configured with configuration as code.

A test has been added that ensures that all configuration methods with a "set" prefix has a corresponding "get" or "is" prefix. This is similar to how the configuration as code plugin does it.

I have not created a related issue for this, but the issue is that this plugin is not fully configurable with configuration-as-code which is unfortunate. I will of course create a related issue if this is required.

- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue

The configuration-as-code plugin expects a plugins configuration
attributes to be accessible with setters prefixed with "set" and
getters prefixed with "get" or "is".

Change and add the getters for the configurations attributes that
don't follow this convention so this plugin can be fully configured
with configuration as code.
@laudrup
Copy link
Copy Markdown
Contributor Author

laudrup commented Apr 7, 2024

Turns out an issue was already created for this. This commit fixes #321

@cdelmonte-zg cdelmonte-zg self-requested a review April 8, 2024 06:35
@cdelmonte-zg cdelmonte-zg added the bug Something isn't working label Apr 8, 2024
@cdelmonte-zg cdelmonte-zg linked an issue Apr 8, 2024 that may be closed by this pull request
@cdelmonte-zg cdelmonte-zg merged commit 4bbf898 into jenkinsci:master Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bitBucketPPRPluginConfig configuration as code

2 participants