You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed attachments are supported now. My bad, I should have googled. And that specific attachment is a visual trip. 😄
On the API side, I'm betting GitHub hasn't added it to their kinda-secret Bulk Import API which is what we use to avoid rate-limiting. But I'm not sure, so I've emailed their support and cc'd @nedbat.
Answer from GitHub support (copy/pasted with their permission):
Hi there Jeff,
Thanks for getting in touch! It isn't currently possible to upload images through the GitHub API the same way you could drag-and-drop an image from your desktop to an Issue Comment box.
If you're interested in a workaround, you could use either the Repo Contents API (high-level API) or the Git Data API (low-level API) to commit images (or other content) to a Git repository:
Once the image is created, you can create an Issue using the Issues API and link to the images (or other content) you've committed to the repository or add a Markdown inline image link to the contents:

Hope that helps! Feel free to let us know if you have any other questions.
Hmmm, I played around with getting attachments. I figured I could at least add a link to the GitHub issue, that refers to the attachment on Bitbucket. But the Bitbucket api doesn't provide the URL to the attachment on the issue, and the URL doesn't seem easily constructable. I can get the content of the attachments, but I'm not sure where I would put them.
Closing, as I think this is probably as good as we'll get with the current GitHub/Bitbucket APIs... very open to future improvements. And thanks again @nedbat for figuring out at least something here.
For some issues the attachments appear to have transferred:
But for others it did not:
Any ideas why some work and some don't?
Only thing I see is that the ones that work appear to have images embedded into the text. But the ones that doesn't the attachments are missing.
From the commit referenced above, it appear that "This issue had attachments:" should appear while processing attachments. No such message was seen in my console.
@thomthom I think you see the difference ("images embedded into the text"). Markdown can have an image reference. In that case, the text is simply copied over to GitHub, which also renders the image. In this case, there is no attachment, just markup indicating an image.
Images which are attached are true attachments. How did you run the converter? Did you use --mention-attachments? If not, the attachments are ignored.
Activity
jeffwidman commentedon May 30, 2018
I don't think GitHub supports attachments.
IIRC, that was why iTerm uses GitLab for issue tracking, even though the project uses GitHub for code management.
Happy to re-open and explore this if I'm wrong...
nedbat commentedon May 31, 2018
Hmmm, you can attach files in the UI (https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), but not in the API? Can that really be? :(
nedbat commentedon May 31, 2018
Is this an attachment?
jeffwidman commentedon Jun 1, 2018
Indeed attachments are supported now. My bad, I should have googled. And that specific attachment is a visual trip. 😄
On the API side, I'm betting GitHub hasn't added it to their kinda-secret Bulk Import API which is what we use to avoid rate-limiting. But I'm not sure, so I've emailed their support and cc'd @nedbat.
jeffwidman commentedon Jun 1, 2018
Answer from GitHub support (copy/pasted with their permission):
nedbat commentedon Jun 16, 2018
Hmmm, I played around with getting attachments. I figured I could at least add a link to the GitHub issue, that refers to the attachment on Bitbucket. But the Bitbucket api doesn't provide the URL to the attachment on the issue, and the URL doesn't seem easily constructable. I can get the content of the attachments, but I'm not sure where I would put them.
jeffwidman commentedon Jun 25, 2018
Partially addressed by @nedbat in b2dfda9
Closing, as I think this is probably as good as we'll get with the current GitHub/Bitbucket APIs... very open to future improvements. And thanks again @nedbat for figuring out at least something here.
thomthom commentedon Jul 9, 2018
I just tested this on a repo I have: https://bitbucket.org/thomthom/solid-inspector/src
For some issues the attachments appear to have transferred:
But for others it did not:
Any ideas why some work and some don't?
Only thing I see is that the ones that work appear to have images embedded into the text. But the ones that doesn't the attachments are missing.
From the commit referenced above, it appear that "This issue had attachments:" should appear while processing attachments. No such message was seen in my console.
jeffwidman commentedon Jul 10, 2018
paging @nedbat:
nedbat commentedon Jul 10, 2018
@thomthom I think you see the difference ("images embedded into the text"). Markdown can have an image reference. In that case, the text is simply copied over to GitHub, which also renders the image. In this case, there is no attachment, just markup indicating an image.
Images which are attached are true attachments. How did you run the converter? Did you use
--mention-attachments? If not, the attachments are ignored.thomthom commentedon Jul 10, 2018
Ah, I didn't use that flag. Didn't realize it was there. I was only referring to the list in the README in master.
I will give it another whirl.
thomthom commentedon Jul 10, 2018
I ran it again, but it still didn't pick up my attachments.
Example:
https://bitbucket.org/thomthom/solid-inspector/issues/40
thomthom/solid-inspector#40
Any ideas?