ueman/feedback

Add github integration?

Closed this issue ยท 8 comments

Great library, how difficult would it be to add github integration?

ueman commented

It wouldn't be that hard. It would probably pretty similar to the already existing GitLab code.

Though GitHub currently does not support uploading images via its API. So there's not much value in doing it at the moment.

@ueman I tried to read myself into it, but from what I've gathered there was always the way of using base64 to upload an image to github.
Could you elaborate where thinks didn't work out, or which errors you had run into?

ueman commented

What exactly do you mean by uploading an image via base64? I'm not aware of it, so could you elaborate on it?

Could you elaborate where thinks didn't work out, or which errors you had run into?

I didn't run into any errors, GitHub just doesn't provide a way to upload images.

Sorry for the short answer, but I think this stackOverflow issue goes into detail how it could work and links to an existing js gist for such a case.

Without wanting to sound condescending, I do not know where to start explaining, bc base64 is quite the standard. An encoding standart for binary data that is. So you can basically convert any file into base64 and back, which makes it widely used for transfer (eg. image transfer).
For more info, see wikipedia ๐Ÿ˜„
Otherwise I am also more than willing to elaborate, I just don't know where to start ๐Ÿ™ˆ

ueman commented

I do know what base64 is :D. However, as far as I know GitHub doesn't allow/render base64 embedded images in issues because of security reasons. It could be an SVG with an embedded script tag after all. I'll double check that though.

The linked gist uploads the image directly to a git branch, which I will not support because that could easily turn into a security nightmare. It'll also need permissions for the auth token which would be really inappropriate for a tool like this.

I am delighted to hear that (and to be honest I would have been confused if you, who created such an amazing package, would not have known ๐Ÿ˜„ )

How is your opinion of using a third party api for the image hosting (eg. imgur) and then just linking the image in the issue?

ueman commented

How is your opinion of using a third party api for the image hosting (eg. imgur) and then just linking the image in the issue?

I already thought about it, too. I'm not doing that because you would have to configure credentials for two services which would at least make me not wanting to use it myself. Using two services would also make GDPR compliance more difficult.

It's really a shame that GitHub doesn't support image uploads.

I personally would have nothing against setting up an additional service to be able to stay with github ๐Ÿ™ˆ.
But I totally understand the problem with the GDPR compliance ๐Ÿ˜’.
Also with imgur there would be the problem of possible deletion after 6 month.