-
Notifications
You must be signed in to change notification settings - Fork 53
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
Is it possible to attach a ZIP file or an image to comment? #79
Comments
It is not. This would ultimately just be markdown in the message itself, but we'd need some place to store the file. I've looked at the relevant APIs and it doesn't appear that GitHub makes the storage they use for their interface available — I'm referring to what happens you you drag-and-drop a file into an editor. I suspect we could do something using the Regardless, great idea for an enhancement. I welcome PRs, and will look into it more myself. |
Ah, and as for advice — you might be able to cobble something together by uploading a file to a cloud provider, e.g., S3 File Upload and working out the URL in a step. Below is an example — I've never used the S3 File Upload action before, just something I found on the marketplace. You could probably find one for whatever provider you use.
|
OK thank you! Much appreciated for the comments and advice. But hope to see such feature natively implemented one day in your project. |
I was looking into it, and it seems like I can use the artifact API to create and build valid artifact URLs. This would allow for a file to be uploaded and then embedded as a link. The only caveat being the file would only persist for your configured retention period, by default that is 90 days. Do you think this would work for your case? If so I can probably implement this. Definitely sounds useful. |
Yes, artifact API is the best approach. Actually I have been using such actions that already use it. Please have a look at https://github.com/gavv/pull-request-artifacts |
@rvalitov Ah, good to see that and know it's somewhat useful. I did some extensive testing of the artifacts API, and unfortunately it doesn't allow for generating a link during an action run. It seems like a sort of arbitrary system limitation on the GitHub side, as many people have requested the feature on the This means the best approach to this is like the action you're using, which has an extensive setup, or allowing the user to provide a cloud bucket like S3. None of this is as user-friendly as I'd like, but it would be great functionality, so I'll work on it. |
Excuse me I didn't get it. I've been using the action specified for build test before PR merge. And it posts attachments to the PR as comments successfully. What limitations do you mean exactly? |
And as far as I tested, it can be triggered automatically on build or on manual run, too. No matter actually... |
Yeah, the one you linked to, https://github.com/gavv/pull-request-artifacts, works by writing back to the repo, as opposed to using GitHub's artifacts API. The difference is files being added to your repo (some might consider that clutter) and related concerns people might have about managing those files which can now be modified and viewed out of context. That said, it's not a bad approach given the limitations of the artifact API and it's the direction that makes most sense to me, so I hope to add the functionality soon. |
If yes or no, how to do it or any advice?
The text was updated successfully, but these errors were encountered: