File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,32 @@ for bug in bugzilla.get_bugs():
2020 print (bug[" id" ])
2121```
2222
23+ ### Uplift Data
24+
25+ Here is an example of how to extract uplift requests and approvals from Bugzilla bug histories:
26+
27+ ``` py
28+ from bugbug import bugzilla, db
29+
30+ db.download(bugzilla.BUGS_DB )
31+
32+ for bug in bugzilla.get_bugs():
33+ for history in bug[" history" ]:
34+ for change in history[" changes" ]:
35+ if change[" added" ].startswith(" approval-mozilla" ):
36+ uplift_tags = change[" added" ].split(" , " )
37+ for uplift_tag in uplift_tags:
38+ release_channel = uplift_tag[len (" approval-mozilla-" ) : - 1 ]
39+ if uplift_tag.endswith(" ?" ):
40+ print (
41+ f " Uplift: Requested \t Bug { bug[' id' ]} \t { history[' when' ]} \t { release_channel} "
42+ )
43+ elif uplift_tag.endswith(" +" ):
44+ print (
45+ f " Uplift: Approved \t Bug { bug[' id' ]} \t { history[' when' ]} \t { release_channel} "
46+ )
47+ ```
48+
2349## Phabricator Revisions
2450
2551``` py
You can’t perform that action at this time.
0 commit comments