Merge pdbq:pkg-bug-get-description into pdbq:main

Proposed by Bryce Harrington
Status: Needs review
Proposed branch: pdbq:pkg-bug-get-description
Merge into: pdbq:main
Diff against target: 249 lines (+178/-12)
3 files modified
pdbq/bug.py (+53/-11)
scripts/pkg-bug (+94/-1)
tests/smoketest_pkg_bug (+31/-0)
Reviewer Review Type Date Requested Status
Canonical Server packageset reviewers Pending
Canonical Server Pending
Canonical Server Reporter Pending
Review via email: mp+452848@code.staging.launchpad.net

Description of the change

This branch adds some commands for getting description information from a given bug report. In particular, in addition to dumping the full description it includes a couple commands to parse out just a given section (e.g. just the '[Test Plan]' for SRU's) or just a given parameter item (e.g. just the 'Scheduled-For:' element for Pinot merge cards).

This implementation is deliberately un-fancy, as I want to just solve the immediate need of accessing the Scheduled-For items for bugs, and any further usefulness this gives the tool is gravy. I don't anticipate anyone other than myself using it, however I can imagine having a way to dump out the [Test Plan] could be theoretically useful. As further use cases turn up the functionality can be expanded to meet the needs.

I had initially wished to implement this functionality as the command 'get' with options '--description', '--section=<section>', and '--param=<param>', however since the script doesn't have command subparsers defined yet, this didn't work. I'll probably add subparser support some day, and redo the API here, but that's more work than I wanted to bite off for now.

This script does not have pytest cases defined for it, and while I'd like to add those one day, for now I've just defined a simple smoketest. I am doubtful anyone but me will be using this tool for now, and I run it under close supervision to catch errors, so feel it's ok to postpone test writing for now.

To post a comment you must log in.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: