UpdateCenter API / UpdateSite Bean: expose hasCoreUpdates() property

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Hi,

      Would be nice to expose the data.hasCoreUpdates() property in the UpdateSite bean.

      This way it would be possible to access the value through the JSON document returned by the updateCenter/coreSource/api/json endpoint.

      This could prove to be handy for Jenkins management scenario

      I believe this should be pretty straightforward and as simple as adding the following lines to core/src/main/java/hudson/model/UpdateSite.java
       

      @ExportedBean
      public class UpdateSite {
         :
         :
           /**
            * Is there any core update available?
            */
           @Exported
           public boolean hasCoreUpdates() {
                Data data = getData();
                return data != null && data.hasCoreUpdates();
           }
        :
        ;
      } 

      Comments ?

      Alexis

            Assignee:
            Unassigned
            Reporter:
            Alexis Deruelle
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: