Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] add support for attachments #100

Closed
makohoek opened this issue Jul 19, 2017 · 4 comments
Closed

[feature request] add support for attachments #100

makohoek opened this issue Jul 19, 2017 · 4 comments

Comments

@makohoek
Copy link

Jira supports attachment upload as well via their rest api:

curl -D- -u {username}:{password} -X POST -H "X-Atlassian-Token: nocheck" -F "file=@{path/to/file}" http://{base-url}/rest/api/2/issue/{issue-key}/attachments

Source: https://confluence.atlassian.com/jirakb/how-to-attach-an-attachment-in-a-jira-issue-using-rest-api-699957734.html

adding jira attach ISSUE FILE would be nice to have

example usage:

jira attach GOJIRA-1234 logs.txt
@coryb
Copy link
Contributor

coryb commented Jul 20, 2017

seems like a good idea. I am unlikely to get to it in the near future, but probably not terribly difficult to implement.

@makohoek
Copy link
Author

Thanks for the interest in the topic.

I guess i will have to learn go if I want to implement it myself :)

@coryb
Copy link
Contributor

coryb commented Sep 17, 2017

attachment functionality release in 1.0.8:
https://github.com/Netflix-Skunkworks/go-jira/releases/tag/v1.0.8

$ jira attach --help
usage: jira attach <command> [<args> ...]

Flags:
      --help                 Show context-sensitive help (also try --help-long and --help-man).
  -v, --verbose ...          Increase verbosity for debugging
  -e, --endpoint=ENDPOINT    Base URI to use for Jira
  -k, --insecure             Disable TLS certificate verification
  -Q, --quiet                Suppress output to console
      --unixproxy=UNIXPROXY  Path for a unix-socket proxy
  -u, --user=USER            Login name used for authentication with Jira service

Subcommands:
  attach create [<flags>] <ISSUE> [<ATTACHMENT>]
    Attach file to issue

  attach list [<flags>] <ISSUE>
    Prints issue details

  attach get [<flags>] [<ATTACHMENT-ID>]
    Fetch attachment

  attach remove [<ATTACHMENT-ID>]
    Delete attachment

@makohoek
Copy link
Author

makohoek commented Sep 18, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants