Running the plugin with `mvn hpi:run`and a GitLab Server is added from the dropdown in Global Config. If no credentials is added to the server and server is tried to be deleted. It doesn't get deleted even upon saving the settings.
Only happens when there is only 1 GitLab Server configuration.
This is common to all plugins like GitHub, Gitea etc
This issue was solved by modifying the `configure` method of Global configuration.
Before:
@Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException { req.bindJSON(this, json); return true; }
After:
@Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException { servers = req.bindJSONToList(GitLabServer.class, json.get("servers")); save(); return super.configure(req, json); }
The servers arraylist is updated with changes in Global Configuration UI.