Ejemplo n.º 1
0
 def _websec_bugs_via_whiteboard(credentials, site):
     bb = BugBuilder(credentials=credentials)
     #bb.product("Websites")
     bb.fields("id", "creation_time", "status", "summary", "assigned_to")
     bb.open()
     bb.advanced("status_whiteboard", "substring", "[site:%s]" % site)
     req = bb.build()
     r = requests.get(req.url, params=req.params, headers=req.headers)
     return r.json().get("bugs", [])
Ejemplo n.º 2
0
 def _websec_bugs_via_component(credentials, site):
     bb = BugBuilder(credentials=credentials)
     bb.product("Websites")
     bb.component(site)
     bb.fields("id", "creation_time", "status", "summary", "assigned_to")
     bb.open()
     bb.advanced("bug_group", "equals", "websites-security")
     req = bb.build()
     r = requests.get(req.url, params=req.params, headers=req.headers)
     return r.json().get("bugs", [])
Ejemplo n.º 3
0
    # #

    # # Get many bugs at once
    bug_ids = (36, 37, 38)
    request = BugBuilder("https://bugzilla.mozilla.org").ids(bug_ids).fields("summary").build()
    print request

    # # Search for bugs
    bb = BugBuilder("https://bugzilla.mozilla.org")
    bb.product("Firefox")
    bb.component("Developer Tools: 3D View")
    bb.status("NEW")
    request = bb.build()
    print request

    # # Actual examples

    bb = BugBuilder("https://bugzilla.mozilla.org")
    bb.product("Websites")
    bb.component("developer.mozilla.org")
    bb.open()
    bb.advanced("bug_group", "equals", "websites-security")
    request = bb.build()
    print request

    bb = BugBuilder("https://bugzilla.mozilla.org")
    bb.product("Websites").open()
    bb.advanced("bug_group", "equals", "websites-security").advanced("status_whiteboard", "substring", "[site:www.mozilla.org]")
    request = bb.build()
    print request