Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct getters for note fields #1607

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

sboardwell
Copy link
Contributor

@sboardwell sboardwell commented Jul 15, 2024

Use correct getters on NoteToPush

This PR corrects the getters used on the NoteToPush internal class of the GitPublisher class.

Checklist

  • I have read the CONTRIBUTING doc
  • Unit tests pass locally with my changes
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes
  • Any dependent changes have been merged and published in upstream modules (like git-client-plugin)

Types of changes

What types of changes does your code introduce?

  • Bug fix (non-breaking change which fixes an issue)

Further comments

n/a

@sboardwell sboardwell requested a review from a team as a code owner July 15, 2024 07:49
@@ -579,15 +579,15 @@ public static final class NoteToPush extends PushConfig {
private String noteNamespace;
private boolean noteReplace;

public String getnoteMsg() {
public String getNoteMsg() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately for binary backwards compatibility the old method signatures needs to be kept and @Deprecated.

Also shouldn't there be needed changes in the config.jelly for the signature change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rsandell, will add the old method signatures back. And good catch with the jelly sections.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reinstated the old methods.

I checked the config.jelly and the fields are referenced so it seems jelly does not need the official getters, just the constructor:

<f:entry title="${%Note to push}" field="noteMsg" >
<f:textarea checkUrl="descriptorByName/GitPublisher/checkNoteMsg" checkDependsOn="" />
</f:entry>
<f:entry field="targetRepoName" title="${%Target remote name}">
<f:textbox/>
</f:entry>
<f:entry title="${%Note's namespace}" field="noteNamespace">
<f:textbox/>
</f:entry>
<f:entry field="noteReplace" >
<f:checkbox title="${%Abort if note exists}" />
</f:entry>

@MarkEWaite MarkEWaite requested a review from rsandell July 15, 2024 14:19
@MarkEWaite MarkEWaite merged commit 2f52f89 into jenkinsci:master Jul 15, 2024
17 checks passed
@MarkEWaite MarkEWaite added the bug Incorrect or flawed behavior label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or flawed behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants