admin管理员组文章数量:1357389
I developed a nice workflow a few years ago to keep an inventory of items on our university's github enterprise instance; unfortunately changes to github Projects (Classic being sunset) and APIs have broken my scripts and I can't seem to find a fix. Here's what I was doing, and hope to return to:
- Enter an item as Issue, including a photo of the item uploaded on github.
- In Projects, anise them in a kanban layout to keep track of the location of each item, as we move them around different shelves in physical space.
- A script (using R, curl, gh, but that's largely irrelevant) to grab the content of each issue and produce an Excel spreadsheet for each shelf (kanban column) listing the item titles, location, persons in charge, details (body of the issue), and the photo that had been uploaded. This is the step that's now broken for me.
When I look at the URL for image attachments on the webpage, it looks like this:
https://media.<GHE-instance>/user/122/files/xx68ccf3-5035-4d1a-8f57-074d530e492c?token=XXXX6S6KNSZS6T66BUI57DH5HWOE
but the token is added automagically to the URL that is stored in the issue itself, and I cannot figure out how to produce such a token programmatically.
Is it a one-time token created on the fly? Can I create a longer lasting one that will work for all images while I grab them?
本文标签: Programmatically retrieving images from github issuesaccess tokenStack Overflow
版权声明:本文标题:Programmatically retrieving images from github issues, access token - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743970670a2570668.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论