A command line tool made by golang to interact with Launchpad API https://api.launchpad.net/devel.html
Query resources:
lp-api get people/+me- Get your own account on Launchpadlp-api get bugs/1- Get bug #1 on Launchpadlp-api get ubuntu ws.op==searchTasks tags==focal tags==jammy tags_combinator==All ws.show==total_size- Get the bug count for ubuntu project with both focal and jammy tags
Modify resources:
lp-api patch bugs/123456 tags:='["focal","jammy"]'- Update bug tagslp-api patch bugs/123456 description:='"Updated description"'- Modify bug description
Add comments:
lp-api post bugs/123456 ws.op=newMessage subject="Update" content="Status update"- Add comment to buglp-api post ~owner/project/+git/repo/+merge/123 ws.op=createComment subject="Review feedback" content="Detailed review comments..."- Add comment to merge proposal
File uploads:
lp-api post bugs/123456 ws.op=addAttachment [email protected] comment="Production error log"- Attach log file to bug (comment is required)lp-api post bugs/123456 ws.op=addAttachment [email protected] comment="UI bug" description="Screenshot showing the issue"- Attach image with descriptionlp-api post bugs/123456 ws.op=addAttachment [email protected] comment="Proposed fix" is_patch=true- Attach patch file
Download builds:
BUILD=$(lp-api get ~ubuntu-cdimage/+livefs/ubuntu/jammy/ubuntu | lp-api .builds_collection_link | jq -r '.entries | .[0] | .web_link'); echo $BUILD- Get the latest build for Ubuntu jammywhile read -r LINK; do lp-api download "$LINK"; done < <(lp-api get "~${BUILD//*~/}" ws.op==getFileUrls | jq -r .[])- Download all artifacts from the latest build
Download the prebuilt binary for your platform from the GitHub releases page and place it in your PATH.
Alternatively, you can install using Go:
go install github.com/fourdollars/lp-api@latest
See launchpad/SKILL.md for comprehensive usage guide and examples.