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

Download attachment/file from an issue/pr #9046

Open
chubin opened this issue May 4, 2024 · 2 comments
Open

Download attachment/file from an issue/pr #9046

chubin opened this issue May 4, 2024 · 2 comments
Labels
enhancement a request to improve CLI gh-issue relating to the gh issue command

Comments

@chubin
Copy link

chubin commented May 4, 2024

Describe the feature or problem you’d like to solve

I know that it is not possible to upload files to issues programmatically, but it would be helpful to at least be able to download files. At the moment, as far as I understand, it is not possible either.

This would allow users to automatically process issues with attachments in their bodies and comments.

Proposed solution

Add a new command that will download a file referred to in the issue by its URL

gh issue download URL
@chubin chubin added the enhancement a request to improve CLI label May 4, 2024
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label May 4, 2024
@andyfeller andyfeller added the gh-issue relating to the gh issue command label May 7, 2024
@andyfeller
Copy link
Contributor

@chubin : Thanks for bringing up this suggestion! ❤

Could you share a little more about the use case in question? How are you envisioning this being used by GitHub CLI users?

I know there have been times where I've attached files to an issue for diagrams or PDFs, but I haven't really considered what I'd attach to issue / PR / discussion that'd I wouldn't commit to the repo. 🤔

I know that it is not possible to upload files to issues programmatically, but it would be helpful to at least be able to download files. At the moment, as far as I understand, it is not possible either.

Sadly, I think you're right: there are no APIs around attachments — whether release, issue, pull request, or discussion — to make something like this easy.

Without them, the best anyone could do is pulling the main issue body and every issue comment looking for specific GitHub domains like *.githubassets.com, *.githubusercontent.com. This sounds like a great idea for someone wanting to hack on a GitHub CLI extension.

@andyfeller andyfeller removed the needs-triage needs to be reviewed label May 7, 2024
@chubin
Copy link
Author

chubin commented May 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI gh-issue relating to the gh issue command
Projects
None yet
Development

No branches or pull requests

3 participants