-
Notifications
You must be signed in to change notification settings - Fork 461
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
Add the "internal" flag to NotesApi.createIssueNote() #1029
Add the "internal" flag to NotesApi.createIssueNote() #1029
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add the internal
flag to the example file:
https://github.com/gitlab4j/gitlab4j-api/blob/main/src/test/resources/org/gitlab4j/api/note.json
--> this should be as close as possible to a real object returned by GitLab.
This way this test make sure our model matches with the JSON example:
gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
Lines 681 to 685 in ff037bd
@Test | |
public void testNote() throws Exception { | |
Note note = unmarshalResource(Note.class, "note.json"); | |
assertTrue(compareJson(note, "note.json")); | |
} |
... and your addition is covered checked by a test.
@hannibal218bc thank you for this PR. Small changes are requested but the change looks almost good to me. |
@jmini thank you for the feedback. I'll submit the changes as soon I as time permits. |
65da884
to
4b40848
Compare
4b40848
to
3faec00
Compare
@jmini thank you for the review, I've updated the MR with the requested changes.
I cross-checked the file against a file retrieved from a 16.4 enterprise instance, and there are a few more differences - added I guess the JSON shall only contain properties that are actually supported by Gitlab4J? |
Sadly this is the long work of keeping our model aligned with the JSON returned by GitLab. Step by step we are getting closer. I agree that the field you mention are out of scope for this pull request.
This is crazy. They have also issue keeping up-to-date their doc with their code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. I will do some manual testing before merging.
Thank you @jmini ! |
createIssueNote()
method allowing to pass theinternal
flag.internal
flag to theNote
model