Downloading an attachment from Github issue in CI Pipeline #11832
Replies: 2 comments
|
I don't think there is a first-class GitHub API for issue attachments in the same way there is for release assets. The way attachments work in GitHub docs today is mostly:
So for automation, the practical pattern is usually:
But I don't think there is a dedicated stable "list attachments for this issue" API endpoint to rely on. So if you need something more automation-friendly in CI, the safer alternatives are usually:
|
|
Short answer: there is still no stable, supported API to download issue attachments in CI the way you can fetch release assets or repository contents. Attachments live on What does not work reliably
This matches the limitation called out in cli/cli#11584 and community#162417. Workarounds teams actually use
Practical CI pattern# Prefer inputs that CI can fetch with GITHUB_TOKEN
- uses: actions/checkout@v4
- run: gh release download "$TAG" --pattern 'report.zip'If you must keep issue attachments for humans, add a label like Enterprise noteOn GitHub Enterprise Cloud, the same API gap applies β there is no separate βenterprise attachment API.β Your security team should treat attachment URLs as opaque, user-scoped links, not as integration points. If GitHub adds attachment APIs in the future, |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
Is there an proven solution that has worked for downloading an attachment from Github issue in Enterprise version?
I know there have been feature requests and discussions ongoing. As far as i know there is no GitHub API that gives you a stable, authenticated URL for βattachmentsβ inside an issue.
Unable to download attached file to a GitHub Issue Β· community Β· Discussion #162417
#11584
#9046
All reactions