|
NAMEbugzilla - command line tool for interacting with BugzillaSYNOPSISbugzilla [options] [command] [command-options]DESCRIPTIONbugzilla is a command line tool for interacting with a Bugzilla instance over REST or XMLRPC.command is one of: * login - log into the given bugzilla instance * new - create a new bug * query - search for bugs matching given criteria * modify - modify existing bugs * attach - attach files to existing bugs, or get attachments * info - get info about the given bugzilla instance GLOBAL OPTIONS--help, -hSyntax: -hshow this help message and exit --bugzillaSyntax: --bugzilla BUGZILLAThe bugzilla URL. Full API URLs are typically like: * https://bugzilla.example.com/xmlrpc.cgi # XMLRPC API * https://bugzilla.example.com/rest/ # REST API If a non-specific URL is passed, like 'bugzilla.redhat.com', bugzilla will try to probe whether the expected XMLRPC or REST path is available, preferring XMLRPC for backwards compatibility. The default URL https://bugzilla.redhat.com --nosslverifySyntax: --nosslverifyDon't error on invalid bugzilla SSL certificate --certSyntax: --cert CERTFILEclient side certificate file needed by the webserver. --loginSyntax: --loginRun interactive "login" before performing the specified command. --usernameSyntax: --username USERNAMELog in with this username --passwordSyntax: --password PASSWORDLog in with this password --restrict-loginSyntax: --restrict-loginThe session (login token) will be restricted to the current IP address. --ensure-logged-inSyntax: --ensure-logged-inRaise an error if we aren't logged in to bugzilla. Consider using this if you are depending on cached credentials, to ensure that when they expire the tool errors, rather than subtly change output. --no-cache-credentialsSyntax: --no-cache-credentialsDon't save any bugzilla cookies or tokens to disk, and don't use any pre-existing credentials. --cookiefileSyntax: --cookiefile COOKIEFILEcookie file to use for bugzilla authentication --tokenfileSyntax: --tokenfile TOKENFILEtoken file to use for bugzilla authentication --verboseSyntax: --verbosegive more info about what's going on --debugSyntax: --debugoutput bunches of debugging info --versionSyntax: --versionshow program's version number and exit STANDARD BUGZILLA OPTIONSThese options are shared by some combination of the 'new', 'query', and 'modify' sub commands. Not every option works for each command though.-p, --productSyntax: --product PRODUCTProduct name -v, --versionSyntax: --version VERSIONProduct version -c, --componentSyntax: --component COMPONENTComponent name -s, --summarySyntax: --summary SUMMARYBug summary -l, --commentSyntax: --comment DESCRIPTIONSet initial bug comment/description --comment-tagSyntax: --comment-tag TAGComment tag for the new comment --sub-componentSyntax: --sub-component SUB_COMPONENTRHBZ sub component name -o, --osSyntax: --os OSOperating system --archSyntax: --arch ARCHArch this bug occurs on -x, --severitySyntax: --severity SEVERITYBug severity -z, --prioritySyntax: --priority PRIORITYBug priority --aliasSyntax: --alias ALIASBug alias (name) -s, --statusSyntax: --status STATUSBug status (NEW, ASSIGNED, etc.) -u, --urlSyntax: --url URLURL for further bug info -m --target_milestoneSyntax: --target_milestone TARGET_MILESTONETarget milestone --target_releaseSyntax: --target_release TARGET_RELEASERHBZ Target release --blockedSyntax: ...]Bug IDs that this bug blocks --dependsonSyntax: ...]Bug IDs that this bug depends on --keywordsSyntax: ...]Bug keywords --groupsSyntax: ...]Which user groups can view this bug --ccSyntax: ...]CC list -a, --assignee, --assigned_toSyntax: --assigned_to ASSIGNED_TOBug assignee -q, --qa_contactSyntax: --qa_contact QA_CONTACTQA contact --flagSyntax: --flag FLAGSet or unset a flag. For example, to set a flag named devel_ack, do --flag devel_ack+ Unset a flag with the 'X' value, like --flag needinfoX --tagsSyntax: --tags TAGSet (personal) tags field -w, --whiteboardSyntax: --whiteboard WHITEBOARDWhiteboard field --devel_whiteboardSyntax: --devel_whiteboard DEVEL_WHITEBOARDRHBZ devel whiteboard field --internal_whiteboardSyntax: --internal_whiteboard INTERNAL_WHITEBOARDRHBZ internal whiteboard field --qa_whiteboardSyntax: --qa_whiteboard QA_WHITEBOARDRHBZ QA whiteboard field -F, --fixed_inSyntax: --fixed_in FIXED_INRHBZ 'Fixed in version' field --fieldSyntax: --field FIELD`` VALUEManually specify a bugzilla API field. FIELD is the raw name used by the bugzilla instance. For example if your bugzilla instance has a custom field cf_my_field, do: --field cf_my_field=VALUE OUTPUT OPTIONSThese options are shared by several commands, for tweaking the text output of the command results.-f, --fullSyntax: --fulloutput detailed bug info -i, --idsSyntax: --idsoutput only bug IDs -e, --extraSyntax: --extraoutput additional bug information (keywords, Whiteboards, etc.) --onelineSyntax: --onelineone line summary of the bug (useful for scripts) --jsonSyntax: --jsonoutput bug contents in JSON format --includefieldSyntax: --includefieldPass the field name to bugzilla include_fields list. Only the fields passed to include_fields are returned by the bugzilla server. This can be specified multiple times. --extrafieldSyntax: --extrafieldPass the field name to bugzilla extra_fields list. When used with --json this can be used to request bugzilla to return values for non-default fields. This can be specified multiple times. --excludefieldSyntax: --excludefieldPass the field name to bugzilla exclude_fields list. When used with --json this can be used to request bugzilla to not return values for a field. This can be specified multiple times. --rawSyntax: --rawraw output of the bugzilla contents. This format is unstable and difficult to parse. Please use the --json instead if you want maximum output from the bugzilla --outputformatSyntax: --outputformat OUTPUTFORMATPrint output in the form given. You can use RPM-style tags that match bug fields, e.g.: '%{id}: %{summary}'. The output of the bugzilla tool should NEVER BE PARSED unless you are using a custom --outputformat. For everything else, just don't parse it, the formats are not stable and are subject to change. --outputformat allows printing arbitrary bug data in a user preferred format. For example, to print a returned bug ID, component, and product, separated with ::, do: --outputformat "%{id}::%{component}::%{product}" The fields (like 'id', 'component', etc.) are the names of the values returned by bugzilla's API. To see a list of all fields, check the API documentation in the 'SEE ALSO' section. Alternatively, run a 'bugzilla --debug query ...' and look at the key names returned in the query results. Also, in most cases, using the name of the associated command line switch should work, like --bug_status becomes %{bug_status}, etc. ‘QUERY’ SPECIFIC OPTIONSCertain options can accept a comma separated list to query multiple values, including --status, --component, --product, --version, --id.Note: querying via explicit command line options will only get you so far. See the --from-url option for a way to use powerful Web UI queries from the command line. -b, --bug_id, --idSyntax: --id IDspecify individual bugs by IDs, separated with commas -r, --reporterSyntax: --reporter REPORTEREmail: search reporter email for given address --quicksearchSyntax: --quicksearch QUICKSEARCHSearch using bugzilla's quicksearch functionality. --savedsearchSyntax: --savedsearch SAVEDSEARCHName of a bugzilla saved search. If you don't own this saved search, you must passed --savedsearch_sharer_id. --savedsearch-sharer-idSyntax: --savedsearch-sharer-id SAVEDSEARCH_SHARER_IDOwner ID of the --savedsearch. You can get this ID from the URL bugzilla generates when running the saved search from the web UI. --from-urlSyntax: --from-url WEB_QUERY_URLMake a working query via bugzilla's 'Advanced search' web UI, grab the url from your browser (the string with query.cgi or buglist.cgi in it), and --from-url will run it via the bugzilla API. Don't forget to quote the string! This only works for Bugzilla 5 and Red Hat bugzilla ‘MODIFY’ SPECIFIC OPTIONSFields that take multiple values have a special input format.Append: --cc=foo@example.com Overwrite: --cc==foo@example.com Remove: --cc=-foo@example.com Options that accept this format: --cc, --blocked, --dependson, --groups, --tags, whiteboard fields. -k, --close RESOLUTIONSyntax: RESOLUTIONClose with the given resolution (WONTFIX, NOTABUG, etc.) -d, --dupeidSyntax: --dupeid ORIGINALID of original bug. Implies --close DUPLICATE --privateSyntax: --privateMark new comment as private --reset-assigneeSyntax: --reset-assigneeReset assignee to component default --reset-qa-contactSyntax: --reset-qa-contactReset QA contact to component default --minor-updateSyntax: --minor-updateRequest bugzilla to not send any email about this change ‘NEW’ SPECIFIC OPTIONS--privateSyntax: --privateMark new comment as private ‘ATTACH’ OPTIONS-f, --fileSyntax: --file FILENAMEFile to attach, or filename for data provided on stdin -d, --descriptionSyntax: --description DESCRIPTIONA short description of the file being attached -t, --typeSyntax: --type MIMETYPEMime-type for the file being attached -g, --getSyntax: --get ATTACHIDDownload the attachment with the given ID --getallSyntax: --getall BUGIDDownload all attachments on the given bug --ignore-obsoleteSyntax: --ignore-obsoleteDo not download attachments marked as obsolete. -l, --commentSyntax: --comment COMMENTAdd comment with attachment ‘INFO’ OPTIONS-p, --productsSyntax: --productsGet a list of products -c, --componentsSyntax: --components PRODUCTList the components in the given product -o, --component_ownersSyntax: --component_owners PRODUCTList components (and their owners) -v, --versionsSyntax: --versions PRODUCTList the versions for the given product --active-componentsSyntax: --active-componentsOnly show active components. Combine with --components* AUTHENTICATION CACHE AND API KEYSSome command usage will require an active login to the bugzilla instance. For example, if the bugzilla instance has some private bugs, those bugs will be missing from 'query' output if you do not have an active login.If you are connecting to a bugzilla 5.0 or later instance, the best option is to use bugzilla API keys. From the bugzilla web UI, log in, navigate to Preferences->API Keys, and generate a key (it will be a long string of characters and numbers). Then create a ~/.config/python-bugzilla/bugzillarc like this: $ cat ~/.config/python-bugzilla/bugzillarc [bugzilla.example.com] api_key=YOUR_API_KEY Replace 'bugzilla.example.com' with your bugzilla host name, and YOUR_API_KEY with the generated API Key from the Web UI. Alternatively, you can use 'bugzilla login --api-key', which will ask for the API key, and save it to bugzillarc for you. For older bugzilla instances, you will need to cache a login cookie or token with the "login" subcommand or the "--login" argument. Additionally, the --no-cache-credentials option will tell the bugzilla tool to not save or use any authentication cache, including the bugzillarc file. EXAMPLESbugzilla query --bug_id 62037 bugzilla query --version 15 --component python-bugzilla bugzilla login bugzilla new -p Fedora -v rawhide -c python-bugzilla \ EXIT STATUSbugzilla normally returns 0 if the requested command was successful. Otherwise, exit status is 1 if bugzilla is interrupted by the user (or a login attempt fails), 2 if a socket error occurs (e.g. TCP connection timeout), and 3 if the Bugzilla server throws an error.BUGSPlease report any bugs as github issues at https://github.com/python-bugzilla/python-bugzillaSEE ALSOhttps://bugzilla.readthedocs.io/en/latest/api/index.html https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html Visit the GSP FreeBSD Man Page Interface. |