#58 Expose expected time when would update hit stable
Merged 3 years ago by frantisekz. Opened 3 years ago by frantisekz.

file modified
+4 -1
@@ -135,6 +135,8 @@ 

          "pretty_name": update["title"],

          "updateid": update["alias"],

          "submission_date": update["date_submitted"],

+         "stable_by_time": str(datetime.datetime.fromisoformat(update["date_submitted"])

+                               + datetime.timedelta(days=update["stable_days"])) if update["autotime"] else None,

          "release": release_from_nevra(update["title"]),

          "url": update["url"],

          "status": update["status"],
@@ -385,6 +387,7 @@ 

          "pretty_name": update["title"],

          "updateid": update["alias"],

          "submission_date": update["date_submitted"],

+         "stable_by_time": (update["date_submitted"] + update["stable_days"]) if update["autotime"] else None,

          "release": release_from_nevra(update["title"]),

          "url": update["url"],

          "status": update["status"],
@@ -491,7 +494,7 @@ 

      """

      data = []

      query = BUGZILLA.url_to_query("https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=__open__&"

-                                "classification=Fedora&product=Fedora&product=Fedora EPEL&component=%s" % urllib.parse.quote(package))

+                                   "classification=Fedora&product=Fedora&product=Fedora EPEL&component=%s" % urllib.parse.quote(package))

      query["include_fields"] = ['blocks', 'comments', 'creation_time', 'creator', 'id', 'keywords', 'last_change_time',

                                 'severity', 'priority', 'status', 'summary', 'version', 'whiteboard']

      bugs = BUGZILLA.query(query)

rebased onto 03d58e9

3 years ago

I don't get how you make str + datetime.timedelta work...

IIUIC this does not really reflect reality, since this can be None if `update["autotime"] is not set.

NVM, copy-paste error on my side that somehow fucked-up the () balance... Works just fine

Mea culpa. LGTM, just maybe "fix" the comment.

rebased onto 42099d9

3 years ago

Pull-Request has been merged by frantisekz

3 years ago
Metadata