Bug 197409

Summary: Add attachments via URL (API)
Product: Services Reporter: Zsolt Udvari <uzsolt>
Component: Bug TrackerAssignee: Oleksandr Tymoshenko <gonzo>
Status: Closed FIXED    
Severity: Affects Some People CC: bugmeister, gonzo
Priority: --- Keywords: feature
Version: unspecified   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226162
Attachments:
Description Flags
foo
none
foo none

Description Zsolt Udvari freebsd_committer freebsd_triage 2015-02-08 13:29:47 UTC
I've a VPS where I run poudriere tests and update ports (maintained by me).
It would be better/easier when can add attachment via URL (diff, poudriere log).
Comment 1 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-02-24 07:38:55 UTC
Is this still relevant?

Bugzilla did have ability to attach URLs but disabled it in 4.2, and it was just URL, not downloaded content.

If you're using XML-RPC API I guess you can implement this functionality in your automation by adding extra step: downloading remote URL and then using standard attach method.

Extending API requires modification of vendor code, it's not possible using extensions, and it adds burdain to future vendor codebase sync-ups. So if there is local workaround possible I'd rather not take our codebase further from vendor's.
Comment 2 Zsolt Udvari freebsd_committer freebsd_triage 2018-02-24 08:26:46 UTC
Is it possible to run it from CLI? What is the suggested/best way/port? If it works well I think it's enough for me.

(I don't have write permission to FreeBSD source tree, I'm "only" a maintainer and a simple reporter so my need is only to able add bug report.)
Comment 3 Real Name 2018-02-24 08:41:56 UTC
Created attachment 190945 [details]
foo

Just test, ignore
Comment 4 Real Name 2018-02-24 08:42:45 UTC
Created attachment 190946 [details]
foo

Another test
Comment 5 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-02-24 08:45:32 UTC
(In reply to Zsolt Udvari from comment #2)


(In reply to Zsolt Udvari from comment #2)

You can use pybugz for this.

- First you need to generate API key: go to https://bugs.freebsd.org, click "Preferences" in top menu, select "API Keys" tab and generate a key.

- Install py36-pybugz package

- Create ~/.bugzrc file with following content:

[default]
connection = FreeBSD
key = keyvaluegoeshere

And then use bugz command to attach file, i.e.:

% bugz attach -d 'Update sysutils/myport to 1.2' 197409 myport-1.2.diff
Comment 6 Zsolt Udvari freebsd_committer freebsd_triage 2018-02-24 09:45:41 UTC
(In reply to Oleksandr Tymoshenko from comment #5)
Oh, thank you for the good tutorial! It seems it works well (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226158). I think should create a wiki page or documentation it. Thanks again!
Comment 7 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-02-24 10:23:30 UTC
(In reply to Zsolt Udvari from comment #6)

No problem. Looks like autoassigner doesn't work for XMLRPC though :-/ But it's different issue.