Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. For this, we will be using the python-bugzilla module
  2.  
  3. pip install python-bugzilla
  4.  
  5. This provides 'bugzilla' command, which is the interface we'll be using.
  6. bugzilla has a "modify" sub command which allows us to update a bug via the CLI.
  7. The most important piece of this is to pass the following argument, which surpresses email updates.
  8.  
  9. --field=minor_update=1
  10.  
  11. To update a single bug, you can either login via the 'login' subcommand or pass your username and password at run time.
  12.  
  13. bugzilla login
  14. bugzilla modify --flag qa_ack+ --field=minor_update=1 12345678 (12345678) is the bug id
  15.  
  16. or
  17.  
  18. bugzilla modify --username myname@redhat.com --password 12345 --flag qa_ack+ --field=minor_update=1 12345678
  19.  
  20. If you are doing multiple updates you can either add them all as space delimited entries on the end of the bugzilla command, or you can create a text file with all the ids.
  21. The second option allows you to iterate over each id, to lessen the chances of a bugzilla timeout.
  22.  
  23. An example of how to update the qe_test_coverage flag to - for all bugs in the list.
  24.  
  25. for id in $(cat bugids.txt); do echo $id && bugzilla modify --flag qe_test_coverage- --field=minor_update=1 $id; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement